Skip to content

Commit

Permalink
chore: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ericzzzzzzz committed Dec 11, 2023
1 parent 16757e0 commit 604205f
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions pkg/skaffold/hooks/render_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down Expand Up @@ -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,
},
},
Expand Down Expand Up @@ -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,
},
},
Expand All @@ -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"}
Expand Down

0 comments on commit 604205f

Please sign in to comment.