Skip to content

Commit

Permalink
Skip linux-dependent tests on all other OSes
Browse files Browse the repository at this point in the history
  • Loading branch information
radeksimko authored and paultyng committed Sep 25, 2020
1 parent 7182a83 commit 48ef9fa
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions tfexec/internal/e2etest/show_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,10 @@ func TestShowStateFile013(t *testing.T) {

// Plan files cannot be transferred between different Terraform versions,
// so we maintain one fixture per supported version
func TestShowPlanFile012(t *testing.T) {
func TestShowPlanFile012_linux(t *testing.T) {
runTestVersions(t, []string{testutil.Latest012}, "non_default_planfile_012", func(t *testing.T, tfv *version.Version, tf *tfexec.Terraform) {
// plan file fixture was created in Linux, and is
// not compatible with Windows
if runtime.GOOS == "windows" {
t.Skip("plan file created in 0.12 on Linux is not compatible with Windows")
if runtime.GOOS != "linux" {
t.Skip("plan file created in 0.12 on Linux is not compatible with other systems")
}

providerName := "null"
Expand Down Expand Up @@ -322,12 +320,10 @@ func TestShowPlanFile013(t *testing.T) {
})
}

func TestShowPlanFileRaw012(t *testing.T) {
func TestShowPlanFileRaw012_linux(t *testing.T) {
runTestVersions(t, []string{testutil.Latest012}, "non_default_planfile_012", func(t *testing.T, tfv *version.Version, tf *tfexec.Terraform) {
// plan file fixture was created in Linux, and is
// not compatible with Windows
if runtime.GOOS == "windows" {
t.Skip("plan file created in 0.12 on Linux is not compatible with Windows")
if runtime.GOOS != "linux" {
t.Skip("plan file created in 0.12 on Linux is not compatible with other systems")
}

// crlf will standardize our line endings for us
Expand Down

0 comments on commit 48ef9fa

Please sign in to comment.