mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Merge pull request #130287 from marosset/windows-unit-tests-cmd-kubeadm-app-util-dryrun-fixes
Fixing k8s.io/kubernetes/cmd/kubeadm/app/util/dryrun unit tests on Windows
This commit is contained in:
commit
72333a838a
@ -74,6 +74,7 @@ func PrintDryRunFiles(files []FileToPrint, w io.Writer) error {
|
||||
if len(outputFilePath) == 0 {
|
||||
outputFilePath = file.RealPath
|
||||
}
|
||||
outputFilePath = filepath.ToSlash(outputFilePath)
|
||||
|
||||
fmt.Fprintf(w, "[dryrun] Would write file %q with content:\n", outputFilePath)
|
||||
fmt.Fprintf(w, "%s", fileBytes)
|
||||
|
@ -36,7 +36,7 @@ func TestPrintDryRunFiles(t *testing.T) {
|
||||
}()
|
||||
fileContents := "apiVersion: kubeadm.k8s.io/unknownVersion"
|
||||
filename := "testfile"
|
||||
cfgPath := filepath.Join(tmpdir, filename)
|
||||
cfgPath := filepath.ToSlash(filepath.Join(tmpdir, filename))
|
||||
err = os.WriteFile(cfgPath, []byte(fileContents), 0644)
|
||||
if err != nil {
|
||||
t.Fatalf("Couldn't write context to file: %v", err)
|
||||
|
Loading…
Reference in New Issue
Block a user