Skip to content

Commit 91312d3

Browse files
authored
test: do not use jp-osa region for HPCS tests (#611)
1 parent 272bcef commit 91312d3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/other_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ func TestRunRoksPatternWithHPCS(t *testing.T) {
1515

1616
options.TerraformVars["hs_crypto_instance_name"] = permanentResources["hpcs_name_south"]
1717
options.TerraformVars["hs_crypto_resource_group"] = permanentResources["hpcs_rg_south"]
18+
// If "jp-osa" was the best region selected, default to us-south instead.
19+
// "jp-osa" is currently not allowing hs-crypto be used for encrypting buckets in that region.
20+
currentRegion, ok := options.TerraformVars["region"]
21+
if ok && currentRegion == "jp-osa" {
22+
options.TerraformVars["region"] = "us-south"
23+
}
1824

1925
output, err := options.RunTestConsistency()
2026
assert.Nil(t, err, "This should not have errored")
@@ -29,6 +35,12 @@ func TestRunVSIPatternWithHPCS(t *testing.T) {
2935

3036
options.TerraformVars["hs_crypto_instance_name"] = permanentResources["hpcs_name_south"]
3137
options.TerraformVars["hs_crypto_resource_group"] = permanentResources["hpcs_rg_south"]
38+
// If "jp-osa" was the best region selected, default to us-south instead.
39+
// "jp-osa" is currently not allowing hs-crypto be used for encrypting buckets in that region.
40+
currentRegion, ok := options.TerraformVars["region"]
41+
if ok && currentRegion == "jp-osa" {
42+
options.TerraformVars["region"] = "us-south"
43+
}
3244

3345
output, err := options.RunTestConsistency()
3446
assert.Nil(t, err, "This should not have errored")

0 commit comments

Comments
 (0)