diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-12-14 16:05:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-14 16:05:42 +0100 |
commit | c501c1d6423759d9180bfe254d1bbe7662d89868 (patch) | |
tree | 1051c349f6c7c88987d1b94cc156f8e717b2a07f /test/system/500-networking.bats | |
parent | 4a060caeabc7061b85a290ba31f87af7d4dbf508 (diff) | |
parent | 5f1f62f0bb7465cf935ea4353cf5afaa03f633af (diff) | |
download | podman-c501c1d6423759d9180bfe254d1bbe7662d89868.tar.gz podman-c501c1d6423759d9180bfe254d1bbe7662d89868.tar.bz2 podman-c501c1d6423759d9180bfe254d1bbe7662d89868.zip |
Merge pull request #12585 from Luap99/network-ls-sort
network ls: show networks in deterministic order
Diffstat (limited to 'test/system/500-networking.bats')
-rw-r--r-- | test/system/500-networking.bats | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/system/500-networking.bats b/test/system/500-networking.bats index deadfa90a..4d36163d7 100644 --- a/test/system/500-networking.bats +++ b/test/system/500-networking.bats @@ -16,6 +16,21 @@ load helpers if [[ ${output} = ${heading} ]]; then die "network ls --noheading did not remove heading: $output" fi + + # check deterministic list order + local net1=a-$(random_string 10) + local net2=b-$(random_string 10) + local net3=c-$(random_string 10) + run_podman network create $net1 + run_podman network create $net2 + run_podman network create $net3 + + run_podman network ls --quiet + # just check the the order of the created networks is correct + # we cannot do an exact match since developer and CI systems could contain more networks + is "$output" ".*$net1.*$net2.*$net3.*podman.*" "networks sorted alphabetically" + + run_podman network rm $net1 $net2 $net3 } # Copied from tsweeney's https://github.com/containers/podman/issues/4827 |