From de2afe8ed0c936c2c042949357d19b07547cdcb8 Mon Sep 17 00:00:00 2001 From: Daniele Rondina Date: Sun, 2 Feb 2020 10:38:41 +0100 Subject: [PATCH] tests/integration: Add cleanup command --- tests/integration/01_simple.sh | 8 ++++++++ tests/integration/01_simple_gzip.sh | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/tests/integration/01_simple.sh b/tests/integration/01_simple.sh index 14d0e27f..d2a67cde 100755 --- a/tests/integration/01_simple.sh +++ b/tests/integration/01_simple.sh @@ -84,6 +84,14 @@ testInstallAgain() { assertEquals 'install test successfully' "$installst" "0" assertNotContains 'contains warning' "$output" 'Filtering out' assertTrue 'package installed' "[ -e '$tmpdir/testrootfs/c' ]" + assertTrue 'package in cache' "[ -e '$tmpdir/testrootfs/packages/c-test-1.0.package.tar.gz' ]" +} + +testCleanup() { + luet cleanup --config $tmpdir/luet.yaml + installst=$? + assertEquals 'install test successfully' "$installst" "0" + assertTrue 'package installed' "[ ! -e '$tmpdir/testrootfs/packages/c-test-1.0.package.tar.gz' ]" } # Load shUnit2. diff --git a/tests/integration/01_simple_gzip.sh b/tests/integration/01_simple_gzip.sh index a1dda86d..8ccb0de7 100755 --- a/tests/integration/01_simple_gzip.sh +++ b/tests/integration/01_simple_gzip.sh @@ -89,6 +89,14 @@ testInstallAgain() { assertEquals 'install test successfully' "$installst" "0" assertNotContains 'contains warning' "$output" 'Filtering out' assertTrue 'package installed' "[ -e '$tmpdir/testrootfs/c' ]" + assertTrue 'package in cache' "[ -e '$tmpdir/testrootfs/packages/c-test-1.0.package.tar.gz' ]" +} + +testCleanup() { + luet cleanup --config $tmpdir/luet.yaml + installst=$? + assertEquals 'install test successfully' "$installst" "0" + assertTrue 'package installed' "[ ! -e '$tmpdir/testrootfs/packages/c-test-1.0.package.tar.gz' ]" } # Load shUnit2.