Force test to be skipped unless PACKER_ACC set.

This commit is contained in:
Andrew Starr-Bochicchio 2020-05-13 11:38:03 -04:00
parent 05d56034dd
commit bf0ab6b722
1 changed files with 4 additions and 0 deletions

View File

@ -20,6 +20,10 @@ func TestBuilderAcc_basic(t *testing.T) {
} }
func TestBuilderAcc_imageId(t *testing.T) { func TestBuilderAcc_imageId(t *testing.T) {
if os.Getenv("PACKER_ACC") == "" {
t.Skip("Acceptance tests skipped unless env 'PACKER_ACC' set")
}
builderT.Test(t, builderT.TestCase{ builderT.Test(t, builderT.TestCase{
PreCheck: func() { testAccPreCheck(t) }, PreCheck: func() { testAccPreCheck(t) },
Builder: &Builder{}, Builder: &Builder{},