tests: Clean up build tests

Build tests don't need the 'find' nor 'rm -r' as they don't
create directories.

There is no need to delete the 'test.yml' file in
the output tests.

Consistently use NAME as the name argument

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
Rolf Neugebauer
2017-09-17 16:20:19 +01:00
parent 27839280f7
commit 6842f10351
17 changed files with 36 additions and 61 deletions

View File

@@ -8,16 +8,15 @@ set -e
#. "${RT_LIB}"
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
IMAGE_NAME=wireguard
NAME=wireguard
clean_up() {
# remove any files, containers, images etc
rm -rf ${IMAGE_NAME}*
rm -f ${NAME}*
}
trap clean_up EXIT
# Test code goes here
moby build "${LINUXKIT_EXAMPLES_DIR}/${IMAGE_NAME}.yml"
moby build "${LINUXKIT_EXAMPLES_DIR}/${NAME}.yml"
exit 0