mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
Fixing k8s.io/kubernetes/cmd/kubeadm/app/util/dryrun unit tests on Windows
Signed-off-by: Mark Rossetti <marosset@microsoft.com>
This commit is contained in:
parent
fbdf8905ea
commit
697293906a
@ -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