diff --git a/test/system/000-TEMPLATE b/test/system/000-TEMPLATE index 8bbd89d7..8f717127 100644 --- a/test/system/000-TEMPLATE +++ b/test/system/000-TEMPLATE @@ -50,9 +50,6 @@ function teardown() { # FIXME: very basic one-pass example @test "ramalama FOO - description of test" { - # FIXME: please try to remove this line; that is, try to write tests - # that will pass as both root and rootless. - # FIXME: template for run commands. Always use 'run_ramalama'! # FIXME: The '?' means 'ignore exit status'; use a number if you # FIXME: expect a precise nonzero code, or omit for 0 (usual case). diff --git a/test/system/015-help.bats b/test/system/015-help.bats index 4b486b4c..3ad7ff86 100644 --- a/test/system/015-help.bats +++ b/test/system/015-help.bats @@ -65,9 +65,6 @@ function check_help() { # This should be disallowed with a clear message. if expr "$full_help" : ".*-l, --latest" >/dev/null; then local nope="exec list port ps top" # these can't be tested - if is_rootless; then - nope="$nope mount restore" # these don't work rootless - fi if ! grep -wq "$cmd" <<<$nope; then run_ramalama 2 "$@" $cmd -l nonexistent-container is "$output" "Error: .*--latest and \(containers\|pods\|arguments\) cannot be used together" \ @@ -83,18 +80,6 @@ function check_help() { # If usage has required arguments, try running without them. if expr "$usage" : '[A-Z]' >/dev/null; then - # Exceptions: these commands don't work rootless - if is_rootless; then - # "pause is not supported for rootless containers" - if [[ "$cmd" = "pause" ]] || [[ "$cmd" = "unpause" ]]; then - continue - fi - # "network rm" too - if [ "$@" = "network" -a "$cmd" = "rm" ]; then - continue - fi - fi - # The /dev/null -} - # Returns the OCI runtime *basename* (typically llama.cpp or vllm). Much as we'd # love to cache this result, we probably shouldn't. function ramalama_runtime() { @@ -605,57 +595,6 @@ function ramalama_isolation_opts() { done } -# rhbz#1895105: rootless journald is unavailable except to users in -# certain magic groups; which our testuser account does not belong to -# (intentional: that is the RHEL default, so that's the setup we test). -function journald_unavailable() { - if ! is_rootless; then - # root must always have access to journal - return 1 - fi - - run journalctl -n 1 - if [[ $status -eq 0 ]]; then - return 1 - fi - - if [[ $output =~ permission ]]; then - return 0 - fi - - # This should never happen; if it does, it's likely that a subsequent - # test will fail. This output may help track that down. - echo "WEIRD: 'journalctl -n 1' failed with a non-permission error:" - echo "$output" - return 1 -} - -# Wait for the pod (1st arg) to transition into the state (2nd arg) -function _ensure_pod_state() { - for i in {0..5}; do - run_ramalama pod inspect $1 --format "{{.State}}" - if [[ $output == "$2" ]]; then - return - fi - sleep 0.5 - done - - die "Timed out waiting for pod $1 to enter state $2" -} - -# Wait for the container's (1st arg) running state (2nd arg) -function _ensure_container_running() { - for i in {0..20}; do - run_ramalama container inspect $1 --format "{{.State.Running}}" - if [[ $output == "$2" ]]; then - return - fi - sleep 0.5 - done - - die "Timed out waiting for container $1 to enter state running=$2" -} - ######### # die # Abort with helpful message #########