From d5f333005a307ed1b1c475ee997fa6ce96f478a3 Mon Sep 17 00:00:00 2001 From: Becca Petrin Date: Tue, 18 Jun 2019 09:50:38 -0700 Subject: [PATCH] fix failing region test --- helper/awsutil/region_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/helper/awsutil/region_test.go b/helper/awsutil/region_test.go index c8d15c9ff0..4b208a6cd5 100644 --- a/helper/awsutil/region_test.go +++ b/helper/awsutil/region_test.go @@ -110,6 +110,12 @@ func TestGetOrDefaultRegion_ConfigFileUnfound(t *testing.T) { } func TestGetOrDefaultRegion_EC2InstanceMetadataPreferredFourth(t *testing.T) { + if !shouldTestFiles { + // In some test environments, like a CI environment, we may not have the + // permissions to write to the ~/.aws/config file. Thus, this test is off + // by default but can be set to on for local development. + t.SkipNow() + } configuredRegion := "" cleanupEnv := setEnvRegion(t, "")