mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 22:17:14 +00:00
fix tests
Signed-off-by: David J. M. Karlsen <david@davidkarlsen.com>
This commit is contained in:
parent
ca1d25d038
commit
e16f75558d
@ -30,7 +30,7 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"k8s.io/klog/v2"
|
"k8s.io/klog/v2"
|
||||||
utilexec "k8s.io/utils/exec"
|
utilexec "k8s.io/utils/exec"
|
||||||
utilio "k8s.io/utils/io"
|
utilio "k8s.io/utils/io"
|
||||||
)
|
)
|
||||||
|
@ -181,7 +181,7 @@ func TestSafeFormatAndMount(t *testing.T) {
|
|||||||
fstype: "xfs",
|
fstype: "xfs",
|
||||||
execScripts: []ExecArgs{
|
execScripts: []ExecArgs{
|
||||||
{"blkid", []string{"-p", "-s", "TYPE", "-s", "PTTYPE", "-o", "export", "/dev/foo"}, "", &testingexec.FakeExitError{Status: 2}},
|
{"blkid", []string{"-p", "-s", "TYPE", "-s", "PTTYPE", "-o", "export", "/dev/foo"}, "", &testingexec.FakeExitError{Status: 2}},
|
||||||
{"mkfs.xfs", []string{"/dev/foo"}, "", nil},
|
{"mkfs.xfs", []string{"-f", "/dev/foo"}, "", nil},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -198,7 +198,7 @@ func TestSafeFormatAndMount(t *testing.T) {
|
|||||||
mountErrs: []error{fmt.Errorf("unknown filesystem type '(null)'"), nil},
|
mountErrs: []error{fmt.Errorf("unknown filesystem type '(null)'"), nil},
|
||||||
execScripts: []ExecArgs{
|
execScripts: []ExecArgs{
|
||||||
{"blkid", []string{"-p", "-s", "TYPE", "-s", "PTTYPE", "-o", "export", "/dev/foo"}, "", &testingexec.FakeExitError{Status: 4}},
|
{"blkid", []string{"-p", "-s", "TYPE", "-s", "PTTYPE", "-o", "export", "/dev/foo"}, "", &testingexec.FakeExitError{Status: 4}},
|
||||||
{"mkfs.xfs", []string{"/dev/foo"}, "", nil},
|
{"mkfs.xfs", []string{"-f", "/dev/foo"}, "", nil},
|
||||||
},
|
},
|
||||||
expErrorType: GetDiskFormatFailed,
|
expErrorType: GetDiskFormatFailed,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user