Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test/system: podman run update /etc/hosts #12219

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions test/system/030-run.bats
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,13 @@ EOF
is "$output" "$random_1" "output matches STDIN"
}

# rhbz#1902979 : podman run fails to update /etc/hosts when --uidmap is provided
@test "podman run update /etc/hosts when --uidmap is provided" {
HOSTS=$(random_string 25)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: use singular (HOST), not plural. Plural is confusing here.

run_podman run --uidmap 0:10001:10002 --rm --hostname $HOSTS $IMAGE grep $HOSTS /etc/hosts
is "${lines[0]}" ".*$HOSTS.*"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check is unnecessary: if the grep above were to fail, run_podman would issue a failure.

}

@test "podman run defaultenv" {
run_podman run --rm $IMAGE printenv
is "$output" ".*TERM=xterm" "output matches TERM"
Expand Down