Skip to content

Commit aacef2b

Browse files
committed
from add-host test: accept either tabs or spaces in /etc/hosts
When checking that the /etc/hosts entry that we add looks right, accept either tabs or spaces separating the IP address from the hostname, since we actually use tabs. Signed-off-by: Nalin Dahyabhai <[email protected]>
1 parent 74d6858 commit aacef2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/from.bats

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,8 @@ load helpers
317317
_prefetch alpine
318318
run_buildah from --quiet --add-host=localhost:127.0.0.1 --pull --signature-policy ${TESTSDIR}/policy.json alpine
319319
cid=$output
320-
run_buildah run --net=container $cid -- cat /etc/hosts
321-
expect_output --substring "127.0.0.1 +localhost"
320+
run_buildah run --net=container $cid -- sed -E 's,([\t ])+, ,g' /etc/hosts
321+
expect_output --substring "127.0.0.1 localhost"
322322
}
323323

324324
@test "from name test" {

0 commit comments

Comments
 (0)