Skip to content

Commit

Permalink
feature: actualizing mocks/commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita Mikhnenko committed Dec 15, 2021
1 parent 0a42626 commit 2f6ba01
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions pkg/mocks/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,26 +59,18 @@ var DiskCommands = map[string]CmdOut{
},
"partprobe -d -s /dev/sde": EmptyOutSuccess,
"blockdev --rereadpt -v /dev/sde": EmptyOutSuccess,
"partprobe /dev/sda": EmptyOutSuccess,
"partprobe -d -s /dev/sdqwe": {
Stdout: "",
Stderr: "",
Err: errors.New("unable to get partition table"),
},
"partprobe": EmptyOutSuccess,
"parted -s /dev/sda mklabel gpt": EmptyOutSuccess,
"parted -s /dev/sdd mklabel gpt": {
Stdout: "",
Stderr: "",
Err: errors.New("unable to create partition table"),
},
"parted -s /dev/sdc mklabel gpt": EmptyOutSuccess,
"sgdisk /dev/sda -o": EmptyOutSuccess,
"sgdisk /dev/sdc -o": EmptyOutSuccess,
"sgdisk -d 1 /dev/sda": {
Stdout: "The operation has completed successfully.",
Stderr: "",
Err: nil,
},
"parted -s /dev/sdb rm 1": EmptyOutFail,
"sgdisk -a1 -n 1:0:0 -c 1:CSI -u 1:64be631b-62a5-11e9-a756-00505680d67f /dev/sde": {
Stdout: `Creating new GPT entries.
Setting name!
Expand All @@ -87,7 +79,6 @@ The operation has completed successfully`,
Stderr: "",
Err: nil,
},
"parted -s /dev/sdf mkpart --align optimal CSI 0% 100%": EmptyOutFail,
"sgdisk /dev/sda --partition-guid=1:64be631b-62a5-11e9-a756-00505680d67f": {
Stdout: "The operation has completed successfully.",
Stderr: "",
Expand Down

0 comments on commit 2f6ba01

Please sign in to comment.