Files
Castulo Martinez 4d0a6d29a1 Implement bundle-remove --orphans flag
This commit implements the --orphan flag for bundle-remove which can be
used to remove bundles that are no longer required by tracked bundles.

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2020-05-08 09:30:50 -07:00

35 lines
629 B
Bash
Executable File

#!/usr/bin/env bats
# Author: Castulo Martinez
# Email: castulo.martinez@intel.com
load "../testlib"
test_setup() {
create_test_environment "$TEST_NAME"
create_bundle -L -t -n test-bundle1 -f /file_1 "$TEST_NAME"
create_bundle -L -n test-bundle2 -f /file_2 "$TEST_NAME"
}
@test "API017: bundle-remove" {
run sudo sh -c "$SWUPD bundle-remove test-bundle1 $SWUPD_OPTS --quiet"
assert_status_is "$SWUPD_OK"
assert_output_is_empty
}
@test "API080: bundle-remove --orphans" {
run sudo sh -c "$SWUPD bundle-remove $SWUPD_OPTS --orphans --quiet"
assert_status_is "$SWUPD_OK"
assert_output_is_empty
}
#WEIGHT=2