@@ -14,12 +14,14 @@ import (
1414)
1515
1616var projectIdFlag = globalflags .ProjectIdFlag
17+ var regionFlag = globalflags .RegionFlag
1718
1819type testCtxKey struct {}
1920
2021var testCtx = context .WithValue (context .Background (), testCtxKey {}, "foo" )
2122var testClient = & objectstorage.APIClient {}
2223var testProjectId = uuid .NewString ()
24+ var testRegion = "eu01"
2325var testBucketName = "my-bucket"
2426
2527func fixtureArgValues (mods ... func (argValues []string )) []string {
@@ -35,6 +37,7 @@ func fixtureArgValues(mods ...func(argValues []string)) []string {
3537func fixtureFlagValues (mods ... func (flagValues map [string ]string )) map [string ]string {
3638 flagValues := map [string ]string {
3739 projectIdFlag : testProjectId ,
40+ regionFlag : testRegion ,
3841 }
3942 for _ , mod := range mods {
4043 mod (flagValues )
@@ -47,6 +50,7 @@ func fixtureInputModel(mods ...func(model *inputModel)) *inputModel {
4750 GlobalFlagModel : & globalflags.GlobalFlagModel {
4851 ProjectId : testProjectId ,
4952 Verbosity : globalflags .VerbosityDefault ,
53+ Region : testRegion ,
5054 },
5155 BucketName : testBucketName ,
5256 }
@@ -57,7 +61,7 @@ func fixtureInputModel(mods ...func(model *inputModel)) *inputModel {
5761}
5862
5963func fixtureRequest (mods ... func (request * objectstorage.ApiCreateBucketRequest )) objectstorage.ApiCreateBucketRequest {
60- request := testClient .CreateBucket (testCtx , testProjectId , testBucketName )
64+ request := testClient .CreateBucket (testCtx , testProjectId , testRegion , testBucketName )
6165 for _ , mod := range mods {
6266 mod (& request )
6367 }
0 commit comments