@@ -13,9 +13,6 @@ import (
1313 "github.com/stackitcloud/stackit-cli/internal/pkg/testutils"
1414)
1515
16- var projectIdFlag = globalflags .ProjectIdFlag
17- var regionFlag = globalflags .RegionFlag
18-
1916type testCtxKey struct {}
2017
2118var testCtx = context .WithValue (context .Background (), testCtxKey {}, "foo" )
@@ -27,8 +24,8 @@ var testGatewayId = uuid.NewString()
2724
2825func fixtureFlagValues (mods ... func (flagValues map [string ]string )) map [string ]string {
2926 flagValues := map [string ]string {
30- projectIdFlag : testProjectId ,
31- regionFlag : testRegion ,
27+ globalflags . ProjectIdFlag : testProjectId ,
28+ globalflags . RegionFlag : testRegion ,
3229 }
3330 for _ , mod := range mods {
3431 mod (flagValues )
@@ -106,23 +103,23 @@ func TestParseInput(t *testing.T) {
106103 description : "project id missing" ,
107104 argValues : fixtureArgValues (),
108105 flagValues : fixtureFlagValues (func (flagValues map [string ]string ) {
109- delete (flagValues , projectIdFlag )
106+ delete (flagValues , globalflags . ProjectIdFlag )
110107 }),
111108 isValid : false ,
112109 },
113110 {
114111 description : "project id invalid 1" ,
115112 argValues : fixtureArgValues (),
116113 flagValues : fixtureFlagValues (func (flagValues map [string ]string ) {
117- flagValues [projectIdFlag ] = ""
114+ flagValues [globalflags . ProjectIdFlag ] = ""
118115 }),
119116 isValid : false ,
120117 },
121118 {
122119 description : "project id invalid 2" ,
123120 argValues : fixtureArgValues (),
124121 flagValues : fixtureFlagValues (func (flagValues map [string ]string ) {
125- flagValues [projectIdFlag ] = "invalid-uuid"
122+ flagValues [globalflags . ProjectIdFlag ] = "invalid-uuid"
126123 }),
127124 isValid : false ,
128125 },
0 commit comments