abra/tests/integration/server_prune.bats
decentral1se efb3fd8759
All checks were successful
continuous-integration/drone/push Build is passing
test: moar fixes
See toolshed/organising#650
2024-12-27 21:16:15 +01:00

45 lines
901 B
Bash

#!/usr/bin/env bash
setup_file(){
load "$PWD/tests/integration/helpers/common"
_common_setup
_add_server
}
teardown_file(){
_rm_server
}
setup(){
load "$PWD/tests/integration/helpers/common"
_common_setup
}
@test "validate server" {
run $ABRA server prune --no-input
assert_failure
run $ABRA server prune foo
assert_failure
}
@test "prune containers, networks and images" {
run $ABRA server prune "$TEST_SERVER"
assert_success
assert_output --partial 'containers pruned'
assert_output --partial 'networks pruned'
assert_output --partial 'images pruned'
}
@test "prune all images" {
run $ABRA server prune "$TEST_SERVER" --all --debug
assert_success
assert_output --partial 'removing all images, not only dangling ones'
}
@test "prune volumes" {
run $ABRA server prune "$TEST_SERVER" --volumes
assert_success
assert_output --partial 'volumes pruned'
}