forked from Bitmessage/sysdeploy
test: add assert to parted test
This commit is contained in:
parent
2f16330445
commit
5a95731305
7
tests/data/parted.dat
Normal file
7
tests/data/parted.dat
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
BYT;
|
||||||
|
T_E_M_P:17.2GB:file:512:512:gpt::;
|
||||||
|
1:1049kB:1074MB:1073MB::EFI system partition:boot, esp;
|
||||||
|
2:1075MB:2147MB:1073MB::root unused:;
|
||||||
|
3:2149MB:3221MB:1073MB::root unused:;
|
||||||
|
4:3222MB:4295MB:1073MB::root unused:;
|
||||||
|
5:4296MB:17.2GB:12.9GB::Encrypted:;
|
|
@ -4,10 +4,12 @@ function test_partitioning()
|
||||||
{
|
{
|
||||||
local img
|
local img
|
||||||
img=$(mktemp -u)
|
img=$(mktemp -u)
|
||||||
dd if=/dev/zero of="$img" bs=1M seek=16384 count=0
|
dd if=/dev/zero of="$img" bs=1M seek=16384 count=0 2> /dev/null
|
||||||
setup_drive "$img"
|
setup_drive "$img"
|
||||||
parted -ms "$img" -- print
|
sed -i "s|T_E_M_P|$img|g;" tests/data/parted.dat
|
||||||
|
output=$(parted -ms "$img" -- print)
|
||||||
rm -f "$img"
|
rm -f "$img"
|
||||||
|
assertEquals "$(cat tests/data/parted.dat)" "$output"
|
||||||
}
|
}
|
||||||
|
|
||||||
function oneTimeSetUp()
|
function oneTimeSetUp()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user