fix tests

Signed-off-by: David J. M. Karlsen <david@davidkarlsen.com>
This commit is contained in:
David J. M. Karlsen 2021-09-11 01:29:26 +02:00
parent ca1d25d038
commit e16f75558d
No known key found for this signature in database
GPG Key ID: F54982D216088EE1
2 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ import (
"syscall"
"time"
"k8s.io/klog/v2"
"k8s.io/klog/v2"
utilexec "k8s.io/utils/exec"
utilio "k8s.io/utils/io"
)

View File

@ -181,7 +181,7 @@ func TestSafeFormatAndMount(t *testing.T) {
fstype: "xfs",
execScripts: []ExecArgs{
{"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},
execScripts: []ExecArgs{
{"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,
},