Add example of vm images testing
This commit is contained in:
parent
540978b835
commit
8bb91a0863
15
cloud-build-test-cloud
Executable file
15
cloud-build-test-cloud
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh -eu
|
||||||
|
|
||||||
|
IMAGE="${1?Pass image}"
|
||||||
|
NAME="test-cloud-$$"
|
||||||
|
|
||||||
|
at_exit() {
|
||||||
|
vml rm --force --names "$NAME"
|
||||||
|
exit "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
trap 'at_exit $?' EXIT
|
||||||
|
trap 'exit 143' HUP INT QUIT PIPE TERM
|
||||||
|
|
||||||
|
vml run -i "$IMAGE" --wait-ssh --names "$NAME"
|
||||||
|
vml ssh --check --cmd 'apt-get update && apt-get install -y vim-console' --names "$NAME"
|
@ -35,6 +35,8 @@ images:
|
|||||||
- use/net-ssh
|
- use/net-ssh
|
||||||
- use/vmguest/kvm
|
- use/vmguest/kvm
|
||||||
- use/repo
|
- use/repo
|
||||||
|
tests:
|
||||||
|
- method: prog(cloud-build-test-cloud)
|
||||||
rootfs-minimal:
|
rootfs-minimal:
|
||||||
target: ve/docker
|
target: ve/docker
|
||||||
kinds:
|
kinds:
|
||||||
|
Loading…
Reference in New Issue
Block a user