diff --git a/modules/gcp/compute_test.go b/modules/gcp/compute_test.go index 8c1242eb4..b94da5198 100644 --- a/modules/gcp/compute_test.go +++ b/modules/gcp/compute_test.go @@ -22,15 +22,15 @@ const DEFAULT_MACHINE_TYPE = "f1-micro" const DEFAULT_IMAGE_FAMILY_PROJECT_NAME = "ubuntu-os-cloud" const DEFAULT_IMAGE_FAMILY_NAME = "family/ubuntu-1804-lts" -// Regions that don't support running f1-micro instances -var RegionsToAvoid = []string{"asia-east2", "southamerica-west1", "europe-west8", "europe-southwest1"} +// Zones that support running f1-micro instances +var ZonesThatSupportF1Micro = []string{"us-central1-a", "us-east1-b", "us-west1-a", "europe-north1-a", "europe-west1-b", "europe-central2-a"} func TestGetPublicIpOfInstance(t *testing.T) { t.Parallel() instanceName := RandomValidGcpName() projectID := GetGoogleProjectIDFromEnvVar(t) - zone := GetRandomZone(t, projectID, nil, nil, RegionsToAvoid) + zone := GetRandomZone(t, projectID, ZonesThatSupportF1Micro, nil, nil) createComputeInstance(t, projectID, zone, instanceName) defer deleteComputeInstance(t, projectID, zone, instanceName) @@ -77,7 +77,7 @@ func TestGetAndSetLabels(t *testing.T) { instanceName := RandomValidGcpName() projectID := GetGoogleProjectIDFromEnvVar(t) - zone := GetRandomZone(t, projectID, nil, nil, RegionsToAvoid) + zone := GetRandomZone(t, projectID, ZonesThatSupportF1Micro, nil, nil) createComputeInstance(t, projectID, zone, instanceName) defer deleteComputeInstance(t, projectID, zone, instanceName) @@ -113,7 +113,7 @@ func TestGetAndSetMetadata(t *testing.T) { projectID := GetGoogleProjectIDFromEnvVar(t) instanceName := RandomValidGcpName() - zone := GetRandomZone(t, projectID, nil, nil, RegionsToAvoid) + zone := GetRandomZone(t, projectID, ZonesThatSupportF1Micro, nil, nil) // Create a new Compute Instance createComputeInstance(t, projectID, zone, instanceName) diff --git a/modules/helm/install_test.go b/modules/helm/install_test.go index b5d7ce8a5..d0bc6f79c 100644 --- a/modules/helm/install_test.go +++ b/modules/helm/install_test.go @@ -26,7 +26,7 @@ import ( const ( remoteChartSource = "https://charts.bitnami.com/bitnami" remoteChartName = "nginx" - remoteChartVersion = "9.7.4" + remoteChartVersion = "13.2.23" ) // Test that we can install a remote chart (e.g bitnami/nginx) diff --git a/test/gcp/packer_gcp_basic_example_test.go b/test/gcp/packer_gcp_basic_example_test.go index 1032db4e9..4386ca84b 100644 --- a/test/gcp/packer_gcp_basic_example_test.go +++ b/test/gcp/packer_gcp_basic_example_test.go @@ -22,8 +22,11 @@ var DefaultRetryablePackerErrors = map[string]string{ } var DefaultTimeBetweenPackerRetries = 15 * time.Second -// Regions that don't support n1-standard-1 instances -var RegionsToAvoid = []string{"asia-east2", "southamerica-west1", "europe-west8", "europe-southwest1"} +// Regions that support running f1-micro instances +var RegionsThatSupportF1Micro = []string{"us-central1", "us-east1", "us-west1", "europe-west1"} + +// Zones that support running f1-micro instances +var ZonesThatSupportF1Micro = []string{"us-central1-a", "us-east1-b", "us-west1-a", "europe-north1-a", "europe-west1-b", "europe-central2-a"} const DefaultMaxPackerRetries = 3 @@ -35,7 +38,7 @@ func TestPackerGCPBasicExample(t *testing.T) { projectID := gcp.GetGoogleProjectIDFromEnvVar(t) // Pick a random GCP zone to test in. This helps ensure your code works in all regions. - zone := gcp.GetRandomZone(t, projectID, nil, nil, RegionsToAvoid) + zone := gcp.GetRandomZone(t, projectID, ZonesThatSupportF1Micro, nil, nil) packerOptions := &packer.Options{ // The path to where the Packer template is located diff --git a/test/gcp/terraform_gcp_example_test.go b/test/gcp/terraform_gcp_example_test.go index b934d58f8..389c42d87 100644 --- a/test/gcp/terraform_gcp_example_test.go +++ b/test/gcp/terraform_gcp_example_test.go @@ -109,7 +109,7 @@ func TestSshAccessToComputeInstance(t *testing.T) { // Setup values for our Terraform apply projectID := gcp.GetGoogleProjectIDFromEnvVar(t) randomValidGcpName := gcp.RandomValidGcpName() - zone := gcp.GetRandomZone(t, projectID, nil, nil, RegionsToAvoid) + zone := gcp.GetRandomZone(t, projectID, ZonesThatSupportF1Micro, nil, nil) terraformOptions := &terraform.Options{ // The path to where our Terraform code is located diff --git a/test/gcp/terraform_gcp_ig_example_test.go b/test/gcp/terraform_gcp_ig_example_test.go index 8ae1b8105..54612570c 100644 --- a/test/gcp/terraform_gcp_ig_example_test.go +++ b/test/gcp/terraform_gcp_ig_example_test.go @@ -24,7 +24,7 @@ func TestTerraformGcpInstanceGroupExample(t *testing.T) { // Setup values for our Terraform apply projectId := gcp.GetGoogleProjectIDFromEnvVar(t) - region := gcp.GetRandomRegion(t, projectId, nil, RegionsToAvoid) + region := gcp.GetRandomRegion(t, projectId, RegionsThatSupportF1Micro, nil) randomValidGcpName := gcp.RandomValidGcpName() clusterSize := 3