summaryrefslogtreecommitdiff
path: root/test/e2e/common_test.go
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2022-07-04 16:50:01 +0000
committerGitHub <noreply@github.com>2022-07-04 16:50:01 +0000
commit3e7e66edad1269420cb45bcabbd93ac4d0e1b585 (patch)
treef66bba21f99c79125dd3fe40de61e4c7c851c8ef /test/e2e/common_test.go
parenta406b950e4f8cf64bdd2c1e03a8480d4b5f97226 (diff)
parent4c5b058e860d386b3c310e04e8ea51ffe60f4c82 (diff)
downloadpodman-3e7e66edad1269420cb45bcabbd93ac4d0e1b585.tar.gz
podman-3e7e66edad1269420cb45bcabbd93ac4d0e1b585.tar.bz2
podman-3e7e66edad1269420cb45bcabbd93ac4d0e1b585.zip
Merge pull request #14822 from Luap99/dns-test
fix flake in aardvark tests
Diffstat (limited to 'test/e2e/common_test.go')
-rw-r--r--test/e2e/common_test.go11
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
}