From 18514344078e6585aaa5c5eb0ec6429d40390a04 Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Wed, 20 May 2015 17:42:41 -0700 Subject: [PATCH] physical/s3: skip unit test if missing ENV vars --- physical/s3_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/physical/s3_test.go b/physical/s3_test.go index d534fa1a6..ebf74f21a 100644 --- a/physical/s3_test.go +++ b/physical/s3_test.go @@ -12,11 +12,14 @@ import ( ) func TestS3Backend(t *testing.T) { + if os.Getenv("AWS_ACCESS_KEY_ID") == "" || os.Getenv("AWS_SECRET_ACCESS_KEY") == "" { + t.SkipNow() + } credentialChain := aws.DefaultChainCredentials creds, err := credentialChain.Get() if err != nil { - t.SkipNow() + t.Fatalf("err: %v", err) } region := os.Getenv("AWS_DEFAULT_REGION")