From 4fdbebf348b8401227c3c2fdaed625f955892472 Mon Sep 17 00:00:00 2001 From: natasha41575 Date: Mon, 11 Apr 2022 16:05:29 -0700 Subject: [PATCH] skip path test on windows --- kyaml/fn/runtime/container/container_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kyaml/fn/runtime/container/container_test.go b/kyaml/fn/runtime/container/container_test.go index 18f00b0c28..bf9e2483a8 100644 --- a/kyaml/fn/runtime/container/container_test.go +++ b/kyaml/fn/runtime/container/container_test.go @@ -7,6 +7,7 @@ import ( "bytes" "fmt" "os" + "runtime" "testing" "github.com/stretchr/testify/assert" @@ -23,6 +24,7 @@ func TestFilter_setupExec(t *testing.T) { expectedArgs []string containerSpec runtimeutil.ContainerSpec UIDGID string + skipOnWindows bool }{ { name: "command", @@ -68,7 +70,8 @@ metadata: }, { - name: "storage_mounts", + name: "storage_mounts", + skipOnWindows: true, // the fieldpaths are different on Windows functionConfig: `apiVersion: apps/v1 kind: Deployment metadata: @@ -122,6 +125,9 @@ metadata: for i := range tests { tt := tests[i] t.Run(tt.name, func(t *testing.T) { + if tt.skipOnWindows && runtime.GOOS == "windows" { + t.SkipNow() + } cfg, err := yaml.Parse(tt.functionConfig) if !assert.NoError(t, err) { t.FailNow()