test: add test-containerd

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
Akihiro Suda
2017-05-26 08:26:33 +00:00
committed by Rolf Neugebauer
parent 43ac05e4dd
commit 4699f80ef7
8 changed files with 105 additions and 4 deletions

View File

@@ -0,0 +1,19 @@
kernel:
image: "linuxkit/kernel:4.9.x"
cmdline: "console=ttyS0 page_poison=1"
init:
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
- linuxkit/containerd:be69ded7ed4437e2989da850581b631bac877d3e
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
onboot:
- name: sysctl
image: "linuxkit/sysctl:3aa6bc663c2849ef239be7d941d3eaf3e6fcc018"
- name: test
image: "test-containerd:latest" # maintainers please push and update
- name: poweroff
image: "linuxkit/poweroff:7404cf2295df89ccfa2dda41997a28307a90cf28"
trust:
org:
- linuxkit

View File

@@ -0,0 +1,22 @@
#!/bin/sh
# SUMMARY: Run contianerd test
# LABELS:
# REPEAT:
set -e
# Source libraries. Uncomment if needed/defined
#. "${RT_LIB}"
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
clean_up() {
find . -iname "test-containerd*" -not -iname "*.yml" -exec rm -rf {} \;
}
trap clean_up EXIT
# Test code goes here
moby build test-containerd.yml
RESULT="$(linuxkit run -mem 2048 test-containerd)"
echo "${RESULT}" | grep -q "suite PASSED"
exit 0