Skip to content

Commit ca553ac

Browse files
authored
Onboard Secrets Manager (ACLs): fix test cases after update on main (#173)
1 parent deff194 commit ca553ac

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

internal/cmd/secrets-manager/instance/create/create_test.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,15 @@ func TestParseInput(t *testing.T) {
9595
flagValues: map[string]string{
9696
projectIdFlag: testProjectId,
9797
instanceNameFlag: "",
98+
aclFlag: "",
9899
},
99100
isValid: true,
100101
expectedModel: &inputModel{
101102
GlobalFlagModel: &globalflags.GlobalFlagModel{
102103
ProjectId: testProjectId,
103104
},
104105
InstanceName: utils.Ptr(""),
106+
Acls: &[]string{},
105107
},
106108
},
107109
{
@@ -121,13 +123,6 @@ func TestParseInput(t *testing.T) {
121123
model.Acls = nil
122124
}),
123125
},
124-
{
125-
description: "acl empty",
126-
flagValues: fixtureFlagValues(func(flagValues map[string]string) {
127-
flagValues[aclFlag] = ""
128-
}),
129-
isValid: false,
130-
},
131126
{
132127
description: "repeated acl flags",
133128
flagValues: fixtureFlagValues(),

internal/cmd/secrets-manager/instance/update/update_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,10 @@ func TestParseInput(t *testing.T) {
127127
projectIdFlag: testProjectId,
128128
aclFlag: "",
129129
},
130-
isValid: false,
130+
isValid: true,
131+
expectedModel: fixtureInputModel(func(model *inputModel) {
132+
model.Acls = &[]string{}
133+
}),
131134
},
132135
{
133136
description: "project id missing",

0 commit comments

Comments
 (0)