Skip to content

Commit

Permalink
Merge pull request #7132 from mook-as/bats/registry/creds/tunneled-ne…
Browse files Browse the repository at this point in the history
…twork

BATS: registry/creds: fix for tunnelled network
  • Loading branch information
jandubois authored Jul 5, 2024
2 parents c9bdde0 + 438b939 commit 93054d4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bats/tests/registry/creds.bats
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,13 @@ local_setup() {
# Essentially localhost, but needs to be a routable IP that also works
# from inside a container. Will be turned into a DNS name using sslip.io.
if is_windows; then
# In WSL all distros have the same IP address
ipaddr="$(ip a show eth0 | awk '/inet / {sub("/.*",""); print $2}')"
if using_networking_tunnel; then
# When using network tunnel, use a fixed address.
ipaddr="192.168.1.2"
else
# In WSL all distros have the same IP address
ipaddr="$(ip a show eth0 | awk '/inet / {sub("/.*",""); print $2}')"
fi
else
# Lima uses a fixed hard-coded IP address
ipaddr="192.168.5.15"
Expand Down

0 comments on commit 93054d4

Please sign in to comment.