@@ -13,12 +13,14 @@ import (
1313 "github.com/stackitcloud/stackit-sdk-go/services/iaas"
1414)
1515
16- const projectIdFlag = globalflags .ProjectIdFlag
16+ const (
17+ testRegion = "eu01"
18+ )
1719
1820type testCtxKey struct {}
1921
2022var (
21- testCtx = context .WithValue (context .Background (), & testCtxKey {}, projectIdFlag )
23+ testCtx = context .WithValue (context .Background (), & testCtxKey {}, "test" )
2224 testClient = & iaas.APIClient {}
2325 testProjectId = uuid .NewString ()
2426
@@ -37,7 +39,8 @@ func fixtureArgValues(mods ...func(argValues []string)) []string {
3739
3840func fixtureFlagValues (mods ... func (flagValues map [string ]string )) map [string ]string {
3941 flagValues := map [string ]string {
40- projectIdFlag : testProjectId ,
42+ globalflags .ProjectIdFlag : testProjectId ,
43+ globalflags .RegionFlag : testRegion ,
4144 }
4245 for _ , mod := range mods {
4346 mod (flagValues )
@@ -50,6 +53,7 @@ func fixtureInputModel(mods ...func(model *inputModel)) *inputModel {
5053 GlobalFlagModel : & globalflags.GlobalFlagModel {
5154 Verbosity : globalflags .VerbosityDefault ,
5255 ProjectId : testProjectId ,
56+ Region : testRegion ,
5357 },
5458 AffinityGroupId : testAffinityGroupId ,
5559 }
@@ -60,7 +64,7 @@ func fixtureInputModel(mods ...func(model *inputModel)) *inputModel {
6064}
6165
6266func fixtureRequest (mods ... func (request * iaas.ApiGetAffinityGroupRequest )) iaas.ApiGetAffinityGroupRequest {
63- request := testClient .GetAffinityGroup (testCtx , testProjectId , testAffinityGroupId )
67+ request := testClient .GetAffinityGroup (testCtx , testProjectId , testRegion , testAffinityGroupId )
6468 for _ , mod := range mods {
6569 mod (& request )
6670 }
0 commit comments