mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
commands: initialize plugins if we have a KMS
this is necessary to be able to read KMS secrets stored within the data provider Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -343,6 +343,18 @@ func TestSetGetConfig(t *testing.T) {
|
||||
if assert.Len(t, config.GetPluginsConfig(), 1) {
|
||||
assert.Equal(t, pluginConf[0].Type, config.GetPluginsConfig()[0].Type)
|
||||
}
|
||||
assert.False(t, config.HasKMSPlugin())
|
||||
pluginConf = []plugin.Config{
|
||||
{
|
||||
Type: "notifier",
|
||||
},
|
||||
{
|
||||
Type: "kms",
|
||||
},
|
||||
}
|
||||
config.SetPluginsConfig(pluginConf)
|
||||
assert.Len(t, config.GetPluginsConfig(), 2)
|
||||
assert.True(t, config.HasKMSPlugin())
|
||||
}
|
||||
|
||||
func TestServiceToStart(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user