From 6e796683dff0fadbc035f6a218fd1230d725b7ac Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Tue, 10 Dec 2019 09:10:28 +0100 Subject: test: move TEST-25-IMPORT setup to static files Also run mask_supporting_services() here. --- test/TEST-25-IMPORT/test.sh | 17 +---- test/TEST-25-IMPORT/testsuite.sh | 138 --------------------------------------- 2 files changed, 2 insertions(+), 153 deletions(-) delete mode 100755 test/TEST-25-IMPORT/testsuite.sh (limited to 'test/TEST-25-IMPORT') diff --git a/test/TEST-25-IMPORT/test.sh b/test/TEST-25-IMPORT/test.sh index 14265cdfc5..977f984bd3 100755 --- a/test/TEST-25-IMPORT/test.sh +++ b/test/TEST-25-IMPORT/test.sh @@ -12,22 +12,9 @@ test_setup() { eval $(udevadm info --export --query=env --name=${LOOPDEV}p2) setup_basic_environment - dracut_install dd gunzip mv tar diff - - # setup the testsuite service - cat >$initdir/etc/systemd/system/testsuite.service < /var/tmp/scratch/adirectory/athirdfile - -# Test import-fs -machinectl import-fs /var/tmp/scratch/ -test -d /var/lib/machines/scratch -machinectl image-status scratch - -# Test export-tar -machinectl export-tar scratch /var/tmp/scratch.tar.gz -test -f /var/tmp/scratch.tar.gz -mkdir /var/tmp/extract -(cd /var/tmp/extract ; tar xzf /var/tmp/scratch.tar.gz) -diff -r /var/tmp/scratch/ /var/tmp/extract/ -rm -rf /var/tmp/extract - -# Test import-tar -machinectl import-tar /var/tmp/scratch.tar.gz scratch2 -test -d /var/lib/machines/scratch2 -machinectl image-status scratch2 -diff -r /var/tmp/scratch/ /var/lib/machines/scratch2 - -# Test removal -machinectl remove scratch -! test -f /var/lib/machines/scratch -! machinectl image-status scratch - -# Test clone -machinectl clone scratch2 scratch3 -test -d /var/lib/machines/scratch2 -machinectl image-status scratch2 -test -d /var/lib/machines/scratch3 -machinectl image-status scratch3 -diff -r /var/tmp/scratch/ /var/lib/machines/scratch3 - -# Test removal -machinectl remove scratch2 -! test -f /var/lib/machines/scratch2 -! machinectl image-status scratch2 - -# Test rename -machinectl rename scratch3 scratch4 -test -d /var/lib/machines/scratch4 -machinectl image-status scratch4 -! test -f /var/lib/machines/scratch3 -! machinectl image-status scratch3 -diff -r /var/tmp/scratch/ /var/lib/machines/scratch4 - -# Test removal -machinectl remove scratch4 -! test -f /var/lib/machines/scratch4 -! machinectl image-status scratch4 - -# Test import-tar hypen/stdin pipe behavior -cat /var/tmp/scratch.tar.gz | machinectl import-tar - scratch5 -test -d /var/lib/machines/scratch5 -machinectl image-status scratch5 -diff -r /var/tmp/scratch/ /var/lib/machines/scratch5 - -# Test export-tar hypen/stdout pipe behavior -mkdir -p /var/tmp/extract -machinectl export-tar scratch5 - | tar xvf - -C /var/tmp/extract/ -diff -r /var/tmp/scratch/ /var/tmp/extract/ -rm -rf /var/tmp/extract - -rm -rf /var/tmp/scratch - -echo OK > /testok - -exit 0 -- cgit v1.2.3