mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-09-13 13:49:25 +00:00
test: the README.md says the numbers correspond to the first letter
A few of these tests appear to be misnumbered, so renumber them. Signed-off-by: David Scott <dave@recoil.org>
This commit is contained in:
13
test/cases/040_packages/009_init_containerd/check.sh
Normal file
13
test/cases/040_packages/009_init_containerd/check.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
function failed {
|
||||
printf "containerd commandline vars not set: FAILED\n" >/dev/console
|
||||
/sbin/poweroff -f
|
||||
exit 1
|
||||
}
|
||||
|
||||
ps -ef | grep containerd | grep -q trace || failed
|
||||
|
||||
printf "containerd commandline vars test suite PASSED\n" >/dev/console
|
||||
|
||||
/sbin/poweroff -f
|
@@ -0,0 +1,3 @@
|
||||
cliopts="--log-level trace"
|
||||
stderr="/var/log/containerd.out.log"
|
||||
stdout="stdout"
|
24
test/cases/040_packages/009_init_containerd/test.sh
Normal file
24
test/cases/040_packages/009_init_containerd/test.sh
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
# SUMMARY: Check that the containerd command-line options have been enabled by init
|
||||
# LABELS:
|
||||
# REPEAT:
|
||||
|
||||
set -e
|
||||
|
||||
# Source libraries. Uncomment if needed/defined
|
||||
#. "${RT_LIB}"
|
||||
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
|
||||
NAME=init_containerd
|
||||
|
||||
clean_up() {
|
||||
rm -rf ${NAME}-*
|
||||
}
|
||||
trap clean_up EXIT
|
||||
|
||||
# Test code goes here
|
||||
linuxkit build -format kernel+initrd -name "${NAME}" test.yml
|
||||
RESULT="$(linuxkit run $NAME)"
|
||||
echo "${RESULT}"
|
||||
echo "${RESULT}" | grep -q "suite PASSED"
|
||||
|
||||
exit 0
|
29
test/cases/040_packages/009_init_containerd/test.yml
Normal file
29
test/cases/040_packages/009_init_containerd/test.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:5.10.47
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:43c52456571369d62882605e4d510f0df3ed93de
|
||||
- linuxkit/runc:5f9941eed05f58293f928c9f2f0b6a3f9f6f55c1
|
||||
- linuxkit/containerd:b991571dd383351dbb2873f9ae3b70475adb6816
|
||||
- linuxkit/ca-certificates:4df823737c9bf6a9564b736f1a19fd25d60e909a
|
||||
services:
|
||||
- name: test
|
||||
image: alpine:3.13
|
||||
pid: host
|
||||
binds:
|
||||
- /check.sh:/check.sh
|
||||
- /dev/console:/dev/console
|
||||
devices:
|
||||
- path: "/dev/console"
|
||||
type: c
|
||||
major: 5
|
||||
minor: 1
|
||||
mode: "0666"
|
||||
capabilities:
|
||||
- CAP_SYS_BOOT
|
||||
command: ["sh", "/check.sh"]
|
||||
files:
|
||||
- path: check.sh
|
||||
source: ./check.sh
|
||||
- path: /etc/containerd/runtime-config.toml
|
||||
source: ./runtime-config.toml
|
Reference in New Issue
Block a user