Skip to content

Commit

Permalink
Adds env var to skip replication tests
Browse files Browse the repository at this point in the history
This commit adds an off-by-default mechanism to skip the AWS replication
tests added in support of the FIPS stemcell work.

We're making this change because we still need to provide new AWS Xenial
stemcells to our customers, but we don't expect there will ever be a
FIPS stemcell, so it doesn't seem all that useful to rework our Xenial
publishing pipeline to run these new tests.

Signed-off-by: Kenneth Lakin <[email protected]>
  • Loading branch information
aramprice authored and klakin-pivotal committed Dec 14, 2023
1 parent 8ab2995 commit 996ed97
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions driver/copy_ami_driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package driver_test

import (
"fmt"
"os"
"strings"

"light-stemcell-builder/config"
Expand All @@ -24,6 +25,12 @@ type AmiCopyConfig struct {
}

var _ = Describe("CopyAmiDriver", func() {
BeforeEach(func() {
if os.Getenv("SKIP_REPLICATION_TESTS") != "" {
Skip("Skipping test, found 'SKIP_REPLICATION_TESTS'")
}
})

It("copies an existing AMI to a new region while preserving its properties", func() {
copyAmi(
AmiCopyConfig{
Expand Down
6 changes: 6 additions & 0 deletions driver/kms_driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package driver_test

import (
"math/rand"
"os"
"strconv"
"strings"

Expand All @@ -16,6 +17,11 @@ import (
)

var _ = Describe("KmsDriver", func() {
BeforeEach(func() {
if os.Getenv("SKIP_REPLICATION_TESTS") != "" {
Skip("Skipping test, found 'SKIP_REPLICATION_TESTS'")
}
})
It("creates an alias for a given kms key", func() {
aliasName := "alias/" + strconv.Itoa(rand.Int())

Expand Down

0 comments on commit 996ed97

Please sign in to comment.