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

Commit

Permalink
long-term DNS livenessProbe tests for soak cluster (#3424)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackfrancis authored Jul 5, 2018
1 parent a8cd0a4 commit bd2a285
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions test/e2e/kubernetes/kubernetes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,18 @@ var _ = Describe("Azure Container Cluster using the Kubernetes Orchestrator", fu
It("should have functional DNS", func() {
if !eng.HasWindowsAgents() {
if !eng.HasNetworkPolicy("calico") {
pod, err := pod.CreatePodFromFile(filepath.Join(WorkloadDir, "dns-liveness.yaml"), "dns-liveness", "default")
Expect(err).NotTo(HaveOccurred())
running, err := pod.WaitOnReady(5*time.Second, 2*time.Minute)
var err error
var p *pod.Pod
p, err = pod.CreatePodFromFile(filepath.Join(WorkloadDir, "dns-liveness.yaml"), "dns-liveness", "default")
if cfg.SoakClusterName == "" {
Expect(err).NotTo(HaveOccurred())
} else {
if err != nil {
p, err = pod.Get("dns-liveness", "default")
Expect(err).NotTo(HaveOccurred())
}
}
running, err := p.WaitOnReady(5*time.Second, 2*time.Minute)
Expect(err).NotTo(HaveOccurred())
Expect(running).To(Equal(true))
}
Expand Down Expand Up @@ -656,9 +665,13 @@ var _ = Describe("Azure Container Cluster using the Kubernetes Orchestrator", fu
Expect(err).NotTo(HaveOccurred())
Expect(running).To(Equal(true))
restarts := pod.Status.ContainerStatuses[0].RestartCount
err = pod.Delete()
Expect(err).NotTo(HaveOccurred())
Expect(restarts).To(Equal(0))
if cfg.SoakClusterName == "" {
err = pod.Delete()
Expect(err).NotTo(HaveOccurred())
Expect(restarts).To(Equal(0))
} else {
log.Printf("%d DNS livenessProbe restarts since this cluster was created...\n", restarts)
}
}
})
})
Expand Down

0 comments on commit bd2a285

Please sign in to comment.