Skip to content

Commit

Permalink
Onboard Secrets Manager (ACLs): fix test cases after update on main (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
DiogoFerrao authored Mar 21, 2024
1 parent deff194 commit ca553ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
9 changes: 2 additions & 7 deletions internal/cmd/secrets-manager/instance/create/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,15 @@ func TestParseInput(t *testing.T) {
flagValues: map[string]string{
projectIdFlag: testProjectId,
instanceNameFlag: "",
aclFlag: "",
},
isValid: true,
expectedModel: &inputModel{
GlobalFlagModel: &globalflags.GlobalFlagModel{
ProjectId: testProjectId,
},
InstanceName: utils.Ptr(""),
Acls: &[]string{},
},
},
{
Expand All @@ -121,13 +123,6 @@ func TestParseInput(t *testing.T) {
model.Acls = nil
}),
},
{
description: "acl empty",
flagValues: fixtureFlagValues(func(flagValues map[string]string) {
flagValues[aclFlag] = ""
}),
isValid: false,
},
{
description: "repeated acl flags",
flagValues: fixtureFlagValues(),
Expand Down
5 changes: 4 additions & 1 deletion internal/cmd/secrets-manager/instance/update/update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ func TestParseInput(t *testing.T) {
projectIdFlag: testProjectId,
aclFlag: "",
},
isValid: false,
isValid: true,
expectedModel: fixtureInputModel(func(model *inputModel) {
model.Acls = &[]string{}
}),
},
{
description: "project id missing",
Expand Down

0 comments on commit ca553ac

Please sign in to comment.