Skip to content

Commit

Permalink
added system test
Browse files Browse the repository at this point in the history
Signed-off-by: kaivol <[email protected]>
  • Loading branch information
kaivol committed Dec 10, 2023
1 parent d5cf46e commit 952c708
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/system/170-run-userns.bats
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,12 @@ EOF
is "${output}" "$user" "Container should run as the current user"
run_podman rmi -f $(pause_image)
}

@test "podman userns=auto with id mapping" {
skip_if_not_rootless
run_podman unshare awk '{if(NR == 2){print $2}}' /proc/self/uid_map
first_id=$output
mapping=1:@$first_id:1
run_podman run --rm --userns=auto:uidmapping=$mapping $IMAGE awk '{if($1 == 1){print $2}}' /proc/self/uid_map
assert "$output" == 1
}

0 comments on commit 952c708

Please sign in to comment.