Skip to content

Commit 5a9e923

Browse files
committed
git cmd structure, adding flavor and acl to create flow, create list flavor endpoint
1 parent c3e7107 commit 5a9e923

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

internal/cmd/git/instance/create/create_test.go

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,18 @@ var (
2121
testClient = &git.APIClient{}
2222
testProjectId = uuid.NewString()
2323

24-
testName = "test-instance"
24+
testName = "test-instance"
25+
testFlavor = "git-100"
26+
testAcl = []string{"0.0.0.0/0"}
2527
)
2628

2729
func fixtureFlagValues(mods ...func(flagValues map[string]string)) map[string]string {
2830
flagValues := map[string]string{
2931
globalflags.ProjectIdFlag: testProjectId,
3032

31-
nameFlag: testName,
33+
nameFlag: testName,
34+
flavorFlag: testFlavor,
35+
aclFlag: testAcl[0],
3236
}
3337
for _, mod := range mods {
3438
mod(flagValues)
@@ -40,6 +44,8 @@ func fixtureInputModel(mods ...func(model *inputModel)) *inputModel {
4044
model := &inputModel{
4145
GlobalFlagModel: &globalflags.GlobalFlagModel{ProjectId: testProjectId, Verbosity: globalflags.VerbosityDefault},
4246
Name: testName,
47+
Flavor: testFlavor,
48+
Acl: testAcl,
4349
}
4450
for _, mod := range mods {
4551
mod(model)
@@ -49,7 +55,9 @@ func fixtureInputModel(mods ...func(model *inputModel)) *inputModel {
4955

5056
func fixtureCreatePayload(mods ...func(payload *git.CreateInstancePayload)) (payload git.CreateInstancePayload) {
5157
payload = git.CreateInstancePayload{
52-
Name: &testName,
58+
Name: &testName,
59+
Flavor: git.CreateInstancePayloadGetFlavorAttributeType(&testFlavor),
60+
Acl: &testAcl,
5361
}
5462
for _, mod := range mods {
5563
mod(&payload)

0 commit comments

Comments
 (0)