Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
f9c744ac
Unverified
Commit
f9c744ac
authored
Oct 30, 2018
by
k8s-ci-robot
Committed by
GitHub
Oct 30, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #70242 from bclau/fixes-dns-false-positives
tests: Fixes DNS tests false positives
parents
739998f8
fb8d2f7e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
dns_common.go
test/e2e/network/dns_common.go
+6
-6
No files found.
test/e2e/network/dns_common.go
View file @
f9c744ac
...
...
@@ -457,10 +457,10 @@ func createProbeCommand(namesToResolve []string, hostEntries []string, ptrLookup
}
fileName
:=
fmt
.
Sprintf
(
"%s_udp@%s"
,
fileNamePrefix
,
name
)
fileNames
=
append
(
fileNames
,
fileName
)
probeCmd
+=
fmt
.
Sprintf
(
`
test -n "$$(dig +notcp +noall +answer +search %s %s)
" && echo OK > /results/%s;`
,
name
,
lookup
,
fileName
)
probeCmd
+=
fmt
.
Sprintf
(
`
check="$$(dig +notcp +noall +answer +search %s %s)" && test -n "$$check
" && echo OK > /results/%s;`
,
name
,
lookup
,
fileName
)
fileName
=
fmt
.
Sprintf
(
"%s_tcp@%s"
,
fileNamePrefix
,
name
)
fileNames
=
append
(
fileNames
,
fileName
)
probeCmd
+=
fmt
.
Sprintf
(
`
test -n "$$(dig +tcp +noall +answer +search %s %s)
" && echo OK > /results/%s;`
,
name
,
lookup
,
fileName
)
probeCmd
+=
fmt
.
Sprintf
(
`
check="$$(dig +tcp +noall +answer +search %s %s)" && test -n "$$check
" && echo OK > /results/%s;`
,
name
,
lookup
,
fileName
)
}
for
_
,
name
:=
range
hostEntries
{
...
...
@@ -472,8 +472,8 @@ func createProbeCommand(namesToResolve []string, hostEntries []string, ptrLookup
podARecByUDPFileName
:=
fmt
.
Sprintf
(
"%s_udp@PodARecord"
,
fileNamePrefix
)
podARecByTCPFileName
:=
fmt
.
Sprintf
(
"%s_tcp@PodARecord"
,
fileNamePrefix
)
probeCmd
+=
fmt
.
Sprintf
(
`podARec=$$(hostname -i| awk -F. '{print $$1"-"$$2"-"$$3"-"$$4".%s.pod.cluster.local"}');`
,
namespace
)
probeCmd
+=
fmt
.
Sprintf
(
`
test -n "$$(dig +notcp +noall +answer +search $${podARec} A)
" && echo OK > /results/%s;`
,
podARecByUDPFileName
)
probeCmd
+=
fmt
.
Sprintf
(
`
test -n "$$(dig +tcp +noall +answer +search $${podARec} A)
" && echo OK > /results/%s;`
,
podARecByTCPFileName
)
probeCmd
+=
fmt
.
Sprintf
(
`
check="$$(dig +notcp +noall +answer +search $${podARec} A)" && test -n "$$check
" && echo OK > /results/%s;`
,
podARecByUDPFileName
)
probeCmd
+=
fmt
.
Sprintf
(
`
check="$$(dig +tcp +noall +answer +search $${podARec} A)" && test -n "$$check
" && echo OK > /results/%s;`
,
podARecByTCPFileName
)
fileNames
=
append
(
fileNames
,
podARecByUDPFileName
)
fileNames
=
append
(
fileNames
,
podARecByTCPFileName
)
...
...
@@ -481,8 +481,8 @@ func createProbeCommand(namesToResolve []string, hostEntries []string, ptrLookup
ptrLookup
:=
fmt
.
Sprintf
(
"%s.in-addr.arpa."
,
strings
.
Join
(
reverseArray
(
strings
.
Split
(
ptrLookupIP
,
"."
)),
"."
))
ptrRecByUDPFileName
:=
fmt
.
Sprintf
(
"%s_udp@PTR"
,
ptrLookupIP
)
ptrRecByTCPFileName
:=
fmt
.
Sprintf
(
"%s_tcp@PTR"
,
ptrLookupIP
)
probeCmd
+=
fmt
.
Sprintf
(
`
test -n "$$(dig +notcp +noall +answer +search %s PTR)
" && echo OK > /results/%s;`
,
ptrLookup
,
ptrRecByUDPFileName
)
probeCmd
+=
fmt
.
Sprintf
(
`
test -n "$$(dig +tcp +noall +answer +search %s PTR)
" && echo OK > /results/%s;`
,
ptrLookup
,
ptrRecByTCPFileName
)
probeCmd
+=
fmt
.
Sprintf
(
`
check="$$(dig +notcp +noall +answer +search %s PTR)" && test -n "$$check
" && echo OK > /results/%s;`
,
ptrLookup
,
ptrRecByUDPFileName
)
probeCmd
+=
fmt
.
Sprintf
(
`
check="$$(dig +tcp +noall +answer +search %s PTR)" && test -n "$$check
" && echo OK > /results/%s;`
,
ptrLookup
,
ptrRecByTCPFileName
)
fileNames
=
append
(
fileNames
,
ptrRecByUDPFileName
)
fileNames
=
append
(
fileNames
,
ptrRecByTCPFileName
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment