Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
test: add dns-loop (actually curl) stress test
Browse files Browse the repository at this point in the history
  • Loading branch information
jackfrancis committed Nov 12, 2020
1 parent 404312a commit 7b0e3f5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/e2e/kubernetes/kubernetes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,16 @@ var _ = Describe("Azure Container Cluster using the Kubernetes Orchestrator", fu
Expect(ready).To(Equal(true))
}

By("Ensuring that we have stable and responsive DNS resolution")
p, err := pod.CreatePodFromFileIfNotExist(filepath.Join(WorkloadDir, "dns-loop.yaml"), "dns-loop", "default", 1*time.Second, cfg.Timeout)
Expect(err).NotTo(HaveOccurred())
running, err := p.WaitOnReady(sleepBetweenRetriesWhenWaitingForPodReady, cfg.Timeout)
Expect(err).NotTo(HaveOccurred())
Expect(running).To(Equal(true))
out, err := p.Exec("--", "dns-loop", "100", "google.com", "0.3", "5")
log.Printf("%s\n", string(out))
Expect(err).NotTo(HaveOccurred())

By("Ensuring that we have stable external DNS resolution as we recycle a bunch of pods")
name := fmt.Sprintf("alpine-%s", cfg.Name)
command := fmt.Sprintf("nc -vz bbc.co.uk 80 || nc -vz google.com 443 || nc -vz microsoft.com 80")
Expand Down
11 changes: 11 additions & 0 deletions test/e2e/kubernetes/workloads/dns-loop.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Pod
metadata:
name: dns-loop
spec:
containers:
- name: dns-loop
image: sturrent/dns-loop
command: ["/bin/sh"]
args: ["-c", "while true; do sleep 1000; done"]
# See https://github.com/sturrent/dns-loop-container

0 comments on commit 7b0e3f5

Please sign in to comment.