@@ -16,6 +16,12 @@ import (
1616 "github.com/stackitcloud/stackit-sdk-go/services/iaas"
1717)
1818
19+ const (
20+ regionFlag = globalflags .RegionFlag
21+
22+ testRegion = "eu01"
23+ )
24+
1925type testCtxKey struct {}
2026
2127var testCtx = context .WithValue (context .Background (), testCtxKey {}, "foo" )
@@ -26,6 +32,8 @@ var testNetworkAreaId = uuid.NewString()
2632
2733func fixtureFlagValues (mods ... func (flagValues map [string ]string )) map [string ]string {
2834 flagValues := map [string ]string {
35+ regionFlag : testRegion ,
36+
2937 organizationIdFlag : testOrgId ,
3038 networkAreaIdFlag : testNetworkAreaId ,
3139 networkRangeFlag : "1.1.1.0/24" ,
@@ -40,6 +48,7 @@ func fixtureInputModel(mods ...func(model *inputModel)) *inputModel {
4048 model := & inputModel {
4149 GlobalFlagModel : & globalflags.GlobalFlagModel {
4250 Verbosity : globalflags .VerbosityDefault ,
51+ Region : testRegion ,
4352 },
4453 OrganizationId : utils .Ptr (testOrgId ),
4554 NetworkAreaId : utils .Ptr (testNetworkAreaId ),
@@ -52,7 +61,7 @@ func fixtureInputModel(mods ...func(model *inputModel)) *inputModel {
5261}
5362
5463func fixtureRequest (mods ... func (request * iaas.ApiCreateNetworkAreaRangeRequest )) iaas.ApiCreateNetworkAreaRangeRequest {
55- request := testClient .CreateNetworkAreaRange (testCtx , testOrgId , testNetworkAreaId )
64+ request := testClient .CreateNetworkAreaRange (testCtx , testOrgId , testNetworkAreaId , testRegion )
5665 request = request .CreateNetworkAreaRangePayload (fixturePayload ())
5766 for _ , mod := range mods {
5867 mod (& request )
0 commit comments