diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-09-08 14:48:24 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-08 14:48:24 -0400 |
commit | 26c8549ae3d4f5c3742d006e40a51080d5ae0746 (patch) | |
tree | fd5100db6dc89b39e55340a1a0562d92dea45067 /test/system/150-login.bats | |
parent | 400799b58cd2c67aea4754d370415081e2d303c6 (diff) | |
parent | 1ff797e3621e7e370f53c4c71c9f40bb6a878936 (diff) | |
download | podman-26c8549ae3d4f5c3742d006e40a51080d5ae0746.tar.gz podman-26c8549ae3d4f5c3742d006e40a51080d5ae0746.tar.bz2 podman-26c8549ae3d4f5c3742d006e40a51080d5ae0746.zip |
Merge pull request #11486 from edsantiago/bats
system tests: new random_free_port helper
Diffstat (limited to 'test/system/150-login.bats')
-rw-r--r-- | test/system/150-login.bats | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/test/system/150-login.bats b/test/system/150-login.bats index b6c04db08..ed925044c 100644 --- a/test/system/150-login.bats +++ b/test/system/150-login.bats @@ -22,12 +22,7 @@ fi # Randomly-assigned port in the 5xxx range if [ -z "${PODMAN_LOGIN_REGISTRY_PORT}" ]; then - for port in $(shuf -i 5000-5999);do - if ! { exec 3<> /dev/tcp/127.0.0.1/$port; } &>/dev/null; then - export PODMAN_LOGIN_REGISTRY_PORT=$port - break - fi - done + export PODMAN_LOGIN_REGISTRY_PORT=$(random_free_port) fi # Override any user-set path to an auth file |