Skip to content

Commit

Permalink
test: better cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
yuval-k committed Aug 8, 2018
1 parent b9d5f6d commit 0b00f79
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions test/e2e/session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,32 @@ var _ = Describe("Single debug mode", func() {
CurrentMicroservicePod = v
break
}
if CurrentMicroservicePod == nil {
Fail("can't find service pod")
}
for _, v := range Microservice2Pods {
Current2MicroservicePod = v
break
}
if CurrentMicroservicePod == nil {
Fail("can't find service2 pod")
}

if len(ClientPods) == 0 {
Fail("can't find client pods")
}

if ClientPods[CurrentMicroservicePod.Spec.NodeName] == nil {
Fail("can't find client pods")
}

// wait for things to settle. may not be needed.
time.Sleep(10 * time.Second)
})

AfterEach(func() {
defer kubectl.StopProxy()
defer kubectl.DeleteNS()

logs, _ := kubectl.Logs(ServerPod.ObjectMeta.Name)
fmt.Fprintln(GinkgoWriter, "server logs:")
Expand All @@ -122,9 +138,6 @@ var _ = Describe("Single debug mode", func() {

// fmt.Println("ZBAM", ClientPods[CurrentMicroservicePod.Spec.NodeName].ObjectMeta.Name, len(clogs))
// time.Sleep(2 * time.Minute)

kubectl.DeleteNS()
kubectl.StopProxy()
})

Describe("Single Container mode", func() {
Expand Down

0 comments on commit 0b00f79

Please sign in to comment.