Skip to content

Commit

Permalink
fix windows UT
Browse files Browse the repository at this point in the history
  • Loading branch information
reingart committed Jan 18, 2025
1 parent 0611204 commit fd74681
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/skaffold/build/docker/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ func TestDockerCLIBuild(t *testing.T) {
t.Override(&docker.DefaultAuthHelper, stubAuth{})
t.Override(&osCreateTemp, func(dir, pattern string) (*os.File, error) {
tmp := t.TempFile("metadata*.json", []byte(metadata))
os.Rename(tmp, "metadata.json")
os.Symlink(tmp, "metadata.json") // rename doesn't work on windows (file is still open)
return os.Open("metadata.json")
})
t.Override(&config.GetConfigForCurrentKubectx, func(configFile string) (*config.ContextConfig, error) {
Expand Down

0 comments on commit fd74681

Please sign in to comment.