1
0
mirror of https://github.com/containers/ramalama.git synced 2026-02-05 06:46:39 +01:00

056-artifact.bats: fix the expected return code for OSErrors

Passing a directory instead of a file to "ramalama convert" results in a IsADirectoryError which is a
subclass of OSError (synonym of IOError). IOErrors result in a return code of 5 (EIO).

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
This commit is contained in:
Mike Bonnet
2026-01-06 11:50:42 -08:00
parent 3afda31e80
commit 835a87ede1

View File

@@ -389,7 +389,7 @@ EOF
# Test with directory instead of file
mkdir -p $RAMALAMA_TMPDIR/testdir
run_ramalama 22 convert --type artifact file://$RAMALAMA_TMPDIR/testdir test-artifact
run_ramalama 5 convert --type artifact file://$RAMALAMA_TMPDIR/testdir test-artifact
is "$output" ".*Error.*" "directory as source is handled gracefully"
}