diff options
author | Paul Holzinger <pholzing@redhat.com> | 2022-07-04 17:11:20 +0200 |
---|---|---|
committer | Paul Holzinger <pholzing@redhat.com> | 2022-07-04 17:16:14 +0200 |
commit | 4c5b058e860d386b3c310e04e8ea51ffe60f4c82 (patch) | |
tree | f66bba21f99c79125dd3fe40de61e4c7c851c8ef /test/e2e/common_test.go | |
parent | a406b950e4f8cf64bdd2c1e03a8480d4b5f97226 (diff) | |
download | podman-4c5b058e860d386b3c310e04e8ea51ffe60f4c82.tar.gz podman-4c5b058e860d386b3c310e04e8ea51ffe60f4c82.tar.bz2 podman-4c5b058e860d386b3c310e04e8ea51ffe60f4c82.zip |
fix flake in aardvark tests
The retry logic in digshort() did not work because dig always exits with
0 even when the domain name is not found. To make it work we have to
check the standard output.
We work on fixing the underlying issue in aardvark/netavark but
this will take more time.
Fixes #14173
Fixes #14171
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'test/e2e/common_test.go')
-rw-r--r-- | test/e2e/common_test.go | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/test/e2e/common_test.go b/test/e2e/common_test.go index 261db8a9a..68b35acf5 100644 --- a/test/e2e/common_test.go +++ b/test/e2e/common_test.go @@ -1042,18 +1042,15 @@ var IPRegex = `(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|[01 // digShort execs into the given container and does a dig lookup with a timeout // backoff. If it gets a response, it ensures that the output is in the correct // format and iterates a string array for match -func digShort(container, lookupName string, matchNames []string, p *PodmanTestIntegration) { +func digShort(container, lookupName, expectedIP string, p *PodmanTestIntegration) { digInterval := time.Millisecond * 250 for i := 0; i < 6; i++ { time.Sleep(digInterval * time.Duration(i)) dig := p.Podman([]string{"exec", container, "dig", "+short", lookupName}) dig.WaitWithDefaultTimeout() - if dig.ExitCode() == 0 { - output := dig.OutputToString() - Expect(output).To(MatchRegexp(IPRegex)) - for _, name := range matchNames { - Expect(output).To(Equal(name)) - } + output := dig.OutputToString() + if dig.ExitCode() == 0 && output != "" { + Expect(output).To(Equal(expectedIP)) // success return } |