mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-21 10:09:07 +00:00
Merge pull request #2380 from dave-tucker/extend-fixes
Cleanup the extend test cases
This commit is contained in:
commit
8cdd1223f5
@ -9,5 +9,5 @@ function failed {
|
||||
|
||||
[ -f /var/lib/docker/bar ] || failed
|
||||
touch /var/lib/docker/foo || failed
|
||||
df -h | grep -q "511.0M" || failed
|
||||
df -h | grep -qE "[4-5][0-9]{2}\.[0-9]{1,}M" || failed
|
||||
printf "extend test suite PASSED\n" >&1
|
@ -9,24 +9,22 @@ set -ex
|
||||
#. "${RT_LIB}"
|
||||
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
|
||||
|
||||
NAME=test-extend
|
||||
NAME=test-extend-ext4
|
||||
DISK=disk0.img
|
||||
clean_up() {
|
||||
find . -depth -iname "${NAME}*" -not -iname "*.yml" -exec rm -rf {} \;
|
||||
rm -rf "create*" || true
|
||||
rm -rf ${DISK} || true
|
||||
docker rmi ${NAME} || true
|
||||
}
|
||||
|
||||
trap clean_up EXIT
|
||||
|
||||
# Test code goes here
|
||||
rm -rf ${DISK} || true
|
||||
docker build -t ${NAME} .
|
||||
moby build --name create -output kernel+initrd test-create.yml
|
||||
linuxkit run -disk file=${DISK},size=256M create
|
||||
rm -rf "create*"
|
||||
linuxkit run -disk file=${DISK},format=raw,size=256M create
|
||||
[ -f ${DISK} ] || exit 1
|
||||
docker run -i --rm --privileged -v "$PWD:/tmp" -w /tmp ${NAME} ./extend.sh ${DISK}
|
||||
# osx takes issue with bs=1M
|
||||
dd if=/dev/zero bs=1048576 count=256 >> ${DISK}
|
||||
moby build -name ${NAME} -output kernel+initrd test.yml
|
||||
RESULT="$(linuxkit run -disk file=${DISK} ${NAME})"
|
||||
echo "${RESULT}"
|
@ -9,5 +9,5 @@ function failed {
|
||||
|
||||
[ -f /var/lib/docker/bar ] || failed
|
||||
touch /var/lib/docker/foo || failed
|
||||
df -h | grep -q "490.9M" || failed
|
||||
df -h | grep -qE "[4-5][0-9]{2}\.[0-9]{1,}M" || failed
|
||||
printf "extend test suite PASSED\n" >&1
|
@ -9,24 +9,22 @@ set -ex
|
||||
#. "${RT_LIB}"
|
||||
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
|
||||
|
||||
NAME=test-extend
|
||||
NAME=test-extend-btrfs
|
||||
DISK=disk0.img
|
||||
clean_up() {
|
||||
find . -depth -iname "${NAME}*" -not -iname "*.yml" -exec rm -rf {} \;
|
||||
rm -rf "create*" || true
|
||||
rm -rf ${DISK} || true
|
||||
docker rmi ${NAME} || true
|
||||
}
|
||||
|
||||
trap clean_up EXIT
|
||||
|
||||
# Test code goes here
|
||||
rm -rf disk0.img || true
|
||||
docker build -t ${NAME} .
|
||||
moby build --name create -output kernel+initrd test-create.yml
|
||||
linuxkit run -disk file=${DISK},size=256M create
|
||||
rm -rf "create*"
|
||||
linuxkit run -disk file=${DISK},format=raw,size=256M create
|
||||
[ -f ${DISK} ] || exit 1
|
||||
docker run -i --rm --privileged -v "$PWD:/tmp" -w /tmp ${NAME} ./extend.sh ${DISK}
|
||||
# osx takes issue with bs=1M
|
||||
dd if=/dev/zero bs=1048576 count=256 >> ${DISK}
|
||||
moby build -name ${NAME} -output kernel+initrd test.yml
|
||||
RESULT="$(linuxkit run -disk file=${DISK} ${NAME})"
|
||||
echo "${RESULT}"
|
@ -9,5 +9,5 @@ function failed {
|
||||
|
||||
[ -f /var/lib/docker/bar ] || failed
|
||||
touch /var/lib/docker/foo || failed
|
||||
df -h | grep -q "507.7M" || failed
|
||||
df -h | grep -qE "[4-5][0-9]{2}\.[0-9]{1,}M" || failed
|
||||
printf "extend test suite PASSED\n" >&1
|
@ -9,24 +9,22 @@ set -ex
|
||||
#. "${RT_LIB}"
|
||||
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
|
||||
|
||||
NAME=test-extend
|
||||
NAME=test-extend-xfs
|
||||
DISK=disk0.img
|
||||
clean_up() {
|
||||
find . -depth -iname "${NAME}*" -not -iname "*.yml" -exec rm -rf {} \;
|
||||
rm -rf "create*" || true
|
||||
rm -rf ${DISK} || true
|
||||
docker rmi ${NAME} || true
|
||||
}
|
||||
|
||||
trap clean_up EXIT
|
||||
|
||||
# Test code goes here
|
||||
rm -rf disk0.img || true
|
||||
docker build -t ${NAME} .
|
||||
moby build --name create -output kernel+initrd test-create.yml
|
||||
linuxkit run -disk file=${DISK},size=256M create
|
||||
rm -rf "create*"
|
||||
linuxkit run -disk file=${DISK},format=raw,size=256M create
|
||||
[ -f ${DISK} ] || exit 1
|
||||
docker run -i --rm --privileged -v "$PWD:/tmp" -w /tmp ${NAME} ./extend.sh ${DISK}
|
||||
# osx takes issue with bs=1M
|
||||
dd if=/dev/zero bs=1048576 count=256 >> ${DISK}
|
||||
moby build -name ${NAME} -output kernel+initrd test.yml
|
||||
RESULT="$(linuxkit run -disk file=${DISK} ${NAME})"
|
||||
echo "${RESULT}"
|
@ -1,2 +0,0 @@
|
||||
FROM alpine:3.6
|
||||
RUN apk add --no-cache qemu-img sfdisk e2fsprogs util-linux
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -ex
|
||||
qemu-img resize -f qcow2 "$1" +256M
|
@ -1,2 +0,0 @@
|
||||
FROM alpine:3.6
|
||||
RUN apk add --no-cache qemu-img sfdisk e2fsprogs util-linux
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -ex
|
||||
qemu-img resize -f qcow2 "$1" +256M
|
@ -1,2 +0,0 @@
|
||||
FROM alpine:3.6
|
||||
RUN apk add --no-cache qemu-img sfdisk e2fsprogs util-linux
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -ex
|
||||
qemu-img resize -f qcow2 "$1" +256M
|
3
test/cases/040_packages/README.md
Normal file
3
test/cases/040_packages/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
NOTE: The cases in this directory are ordered alphabetically.
|
||||
The index used is the position of the first letter of the name in the alphabet.
|
||||
For example, 001_a, 002_b, 003_c etc...
|
Loading…
Reference in New Issue
Block a user