Skip to content

Commit

Permalink
Skip image extensions tests on Windows
Browse files Browse the repository at this point in the history
Signed-off-by: Natalie Arellano <narellano@vmware.com>
  • Loading branch information
natalieparellano committed Oct 7, 2022
1 parent 732bce0 commit 42a92fa
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
3 changes: 3 additions & 0 deletions buildpack/detect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"io/ioutil"
"os"
"path/filepath"
"runtime"
"strings"
"testing"

Expand Down Expand Up @@ -342,6 +343,8 @@ func testDetect(t *testing.T, when spec.G, it spec.S) {
)

it.Before(func() {
h.SkipIf(t, runtime.GOOS == "windows", "Image extensions are not supported for Windows builds")

descriptorPath = filepath.Join("testdata", "extension", "by-id", "A", "v1", "extension.toml")
var err error
descriptor, err = buildpack.ReadExtDescriptor(descriptorPath)
Expand Down
2 changes: 1 addition & 1 deletion buildpack/generate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
)

func TestGenerate(t *testing.T) {
if !(runtime.GOOS == "windows") {
if runtime.GOOS != "windows" {
spec.Run(t, "unit-generate", testGenerate, spec.Report(report.Terminal{}))
}
}
Expand Down
7 changes: 5 additions & 2 deletions extender_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"io/ioutil"
"os"
"path/filepath"
"runtime"
"testing"
"time"

Expand All @@ -24,8 +25,10 @@ import (
)

func TestExtender(t *testing.T) {
spec.Run(t, "unit-new-extender", testExtenderFactory, spec.Report(report.Terminal{}))
spec.Run(t, "unit-extender", testExtender, spec.Report(report.Terminal{}))
if runtime.GOOS != "windows" {
spec.Run(t, "unit-new-extender", testExtenderFactory, spec.Report(report.Terminal{}))
spec.Run(t, "unit-extender", testExtender, spec.Report(report.Terminal{}))
}
}

func testExtenderFactory(t *testing.T, when spec.G, it spec.S) {
Expand Down
7 changes: 5 additions & 2 deletions generator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"io/ioutil"
"os"
"path/filepath"
"runtime"
"strings"
"testing"

Expand All @@ -26,8 +27,10 @@ import (
)

func TestGenerator(t *testing.T) {
spec.Run(t, "unit-new-generator", testGeneratorFactory, spec.Report(report.Terminal{}))
spec.Run(t, "unit-generator", testGenerator, spec.Report(report.Terminal{}))
if runtime.GOOS != "windows" {
spec.Run(t, "unit-new-generator", testGeneratorFactory, spec.Report(report.Terminal{}))
spec.Run(t, "unit-generator", testGenerator, spec.Report(report.Terminal{}))
}
}

func testGeneratorFactory(t *testing.T, when spec.G, it spec.S) {
Expand Down

0 comments on commit 42a92fa

Please sign in to comment.