From 604205f5dcaac338d05f73fb238d2368cea4a78d Mon Sep 17 00:00:00 2001 From: ericzzzzzzz <102683393+ericzzzzzzz@users.noreply.github.com> Date: Mon, 11 Dec 2023 16:40:13 -0500 Subject: [PATCH] chore: fix --- pkg/skaffold/hooks/render_test.go | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/pkg/skaffold/hooks/render_test.go b/pkg/skaffold/hooks/render_test.go index c267c44c189..1184c2e7012 100644 --- a/pkg/skaffold/hooks/render_test.go +++ b/pkg/skaffold/hooks/render_test.go @@ -144,7 +144,7 @@ func TestRenderHooks(t *testing.T) { } for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { - if test.requiresWindowsOS != (runtime.GOOS == "windows") { + if test.requiresWindowsOS != (runtime.GOOS == Windows) { t.Skip() } @@ -256,7 +256,7 @@ spec: { HostHook: &latest.PostRenderHostHook{ OS: []string{"windows"}, - Command: []string{"cmd.exe", "/C", `Get-Content | ForEach-Object { $_ -replace "before", "after" }`}, + Command: []string{"cmd.exe", "/C", `ForEach-Object { $_ -replace "before", "after" }`}, WithChange: true, }, }, @@ -284,17 +284,10 @@ spec: manifestList: SimpleManifest, expectedManifestList: SimpleManifest, postHooks: []latest.PostRenderHookItem{ - { - HostHook: &latest.PostRenderHostHook{ - OS: []string{"linux", "darwin"}, - Command: []string{"sed", "s/before/after/g"}, - WithChange: false, - }, - }, { HostHook: &latest.PostRenderHostHook{ OS: []string{"windows"}, - Command: []string{"cmd.exe", "/C", `Get-Content | ForEach-Object { $_ -replace "before", "after" }`}, + Command: []string{"cmd.exe", "/C", `ForEach-Object { $_ -replace "before", "after" }`}, WithChange: false, }, }, @@ -304,7 +297,7 @@ spec: for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { - if test.requireWindows != (runtime.GOOS == "windows") { + if test.requireWindows != (runtime.GOOS == Windows) { t.Skip() } namespaces := []string{"np1", "np2"}