Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Switch target FQDN #25571

Merged
merged 2 commits into from May 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 8 additions & 8 deletions test/k8s/fqdn.go
Expand Up @@ -26,36 +26,36 @@ var _ = SkipDescribeIf(helpers.RunsOn54Kernel, "K8sAgentFQDNTest", func() {
appPods map[string]string

// The IPs are updated in BeforeAll
worldTarget = "http://vagrant-cache.ci.cilium.io"
worldTarget = "vagrant-cache.ci.cilium.io"
worldTargetIP = "147.75.38.95"
worldInvalidTarget = "http://jenkins.cilium.io"
worldInvalidTarget = "cilium.io"
worldInvalidTargetIP = "104.198.14.52"
)

BeforeAll(func() {
// In case the IPs changed from above, update them here
var lookupErr error
err := helpers.WithTimeout(func() bool {
addrs, err2 := net.LookupHost("vagrant-cache.ci.cilium.io")
addrs, err2 := net.LookupHost(worldTarget)
if err2 != nil {
lookupErr = fmt.Errorf("error looking up vagrant-cache.ci.cilium.io: %s", err2)
lookupErr = fmt.Errorf("error looking up target domain: %s", err2)
return false
}
worldTargetIP = addrs[0]
return true
}, "Could not get vagrant-cache.ci.cilium.io IP", &helpers.TimeoutConfig{Timeout: helpers.HelperTimeout})
}, fmt.Sprintf("Could not get %s IP", worldTarget), &helpers.TimeoutConfig{Timeout: helpers.HelperTimeout})
Expect(err).Should(BeNil(), "Error obtaining IP for test: %s", lookupErr)

lookupErr = nil
err = helpers.WithTimeout(func() bool {
addrs, err2 := net.LookupHost("jenkins.cilium.io")
addrs, err2 := net.LookupHost(worldInvalidTarget)
if err2 != nil {
lookupErr = fmt.Errorf("error looking up jenkins.cilium.io: %s", err2)
lookupErr = fmt.Errorf("error looking up target domain: %s", err2)
return false
}
worldInvalidTargetIP = addrs[0]
return true
}, "Could not get jenkins.cilium.io IP", &helpers.TimeoutConfig{Timeout: helpers.HelperTimeout})
}, fmt.Sprintf("Could not get %s IP", worldInvalidTarget), &helpers.TimeoutConfig{Timeout: helpers.HelperTimeout})
Expect(err).Should(BeNil(), "Error obtaining IP for test: %s", lookupErr)

kubectl = helpers.CreateKubectl(helpers.K8s1VMName(), logger)
Expand Down
2 changes: 1 addition & 1 deletion test/k8s/manifests/fqdn-proxy-multiple-specs-v2.yaml
Expand Up @@ -27,7 +27,7 @@ specs:
dns:
- matchPattern: "*"
- toFQDNs:
- matchPattern: "jenkins.cilium.io"
- matchPattern: "cilium.io"
endpointSelector:
matchLabels:
id: app3
Expand Down
2 changes: 1 addition & 1 deletion test/k8s/manifests/fqdn-proxy-multiple-specs.yaml
Expand Up @@ -26,7 +26,7 @@ specs:
dns:
- matchPattern: "*"
- toFQDNs:
- matchPattern: "jenkins.cilium.io"
- matchPattern: "cilium.io"
endpointSelector:
matchLabels:
id: app3