Skip to content

Commit

Permalink
[squashme] fix rootless tests
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksa Sarai <asarai@suse.de>
  • Loading branch information
cyphar committed Apr 9, 2017
1 parent 54e2cae commit a2c5217
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions test/config.bats
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,14 @@ function teardown() {
[ "$output" -eq 8888 ]

# Make sure additionalGids were set.
sane_run jq -SMr '.process.user.additionalGids[]' "$BUNDLE_B/config.json"
[ "$status" -eq 0 ]
[ "${#lines[@]}" -eq 2 ]
sane_run jq -SMr '.process.user.additionalGids | length' "$BUNDLE_B/config.json"
[ "$status" -eq 0 ]
if [ "$ROOTLESS" -ne 0 ]; then
[[ "$output" == 2 ]]
else
# In rootless containers additionalGids should be empty.
[[ "$output" == 0 ]]
fi

# Check mounts.
printf -- '%s\n' "${lines[*]}" | grep '^9001$'
Expand Down

0 comments on commit a2c5217

Please sign in to comment.