chore(e2e): Use region specified in variable (#4814)

This commit is contained in:
Michael Li authored and GitHub committed 2024-05-28 09:46:01 -04:00
1 parent e0a7c9acdd
commit a22f031ce0
12 files changed
+17 -7

No files matched your search

+2 -2
View File
@@ -203,7 +203,7 @@ func AddHostToHostSetCli(t testing.TB, ctx context.Context, hostSetId string, ho
// CreateAwsHostCatalogCli uses the cli to create a new AWS dynamic host catalog.
// Returns the id of the new host catalog.
func CreateAwsHostCatalogCli(t testing.TB, ctx context.Context, projectId string, accessKeyId string, secretAccessKey string) (string, error) {
func CreateAwsHostCatalogCli(t testing.TB, ctx context.Context, projectId, accessKeyId, secretAccessKey, region string) (string, error) {
name, err := base62.Random(16)
if err != nil {
return "", err
@@ -215,7 +215,7 @@ func CreateAwsHostCatalogCli(t testing.TB, ctx context.Context, projectId string
"-scope-id", projectId,
"-plugin-name", "aws",
"-attr", "disable_credential_rotation=true",
"-attr", "region=us-east-1",
"-attr", fmt.Sprintf("region=%s", region),
"-secret", "access_key_id=env://E2E_AWS_ACCESS_KEY_ID",
"-secret", "secret_access_key=env://E2E_AWS_SECRET_ACCESS_KEY",
"-name", fmt.Sprintf("e2e Host Catalog %s", name),