Skip to content
Snippets Groups Projects

ADHOC - Expand secrets manager to support create and delete

Merged Billy Griffiths requested to merge adhoc_expand_secrets_manager into main
1 unresolved thread
@@ -46,26 +46,26 @@ func testCreateSecret(t *testing.T) {
secretName, err := CreateSecret(secretID, secret, isDebug)
if err != nil {
t.Errorf("Secret with name '%s' could not be created.", secretName)
t.Errorf("Secret with ID '%s' could not be created.", secretName)
}
t.Logf("Secret with name '%s' successfully created.", secretName)
t.Logf("Secret with ID '%s' successfully created.", secretName)
}
func testGetSecret(t *testing.T) {
secret, _ := GetSecret(secretID, isDebug)
if len(secret) <= 0 {
t.Errorf("Could not get secret with name %s, or secret has not content", secretID)
t.Errorf("Could not get secret with ID %s, or secret has no content", secretID)
}
t.Logf("Secret with name `%s` has content: %s", secretID, secret)
t.Logf("Secret with ID `%s` has content: %s", secretID, secret)
}
func testDeleteSecret(t *testing.T) {
err := DeleteSecret(secretID, true, isDebug)
if err != nil {
t.Errorf("Secret with name '%s' could not be deleted.", secretID)
t.Errorf("Secret with ID '%s' could not be deleted.", secretID)
return
}
t.Logf("Secret with name '%s' successfully deleted.", secretID)
t.Logf("Secret with ID '%s' successfully deleted.", secretID)
}
Loading