Skip to content

Commit

Permalink
Make Pods accessible again
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasBergmeier6176 committed Nov 22, 2024
1 parent de1ba64 commit ab02964
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/gke/test/pods.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

type CreatedPod struct {
pods v1.PodInterface
pod *core.Pod
Pod *core.Pod
logStreaming sync.WaitGroup
}

Expand All @@ -32,14 +32,14 @@ func MustCreatePod(tb testing.TB, clientset *kubernetes.Clientset, ctx context.C

return &CreatedPod{
pods: pods,
pod: pod,
Pod: pod,
}
}

func (cp *CreatedPod) Delete() error {
cp.logStreaming.Wait()

return cp.pods.Delete(context.TODO(), cp.pod.Name, metav1.DeleteOptions{})
return cp.pods.Delete(context.TODO(), cp.Pod.Name, metav1.DeleteOptions{})
}

// PodRun is an test execution run of a Pod.
Expand All @@ -62,7 +62,7 @@ func (cp *CreatedPod) RunWithStreams(tb testing.TB, ctx context.Context, streams
go func() {
defer cp.logStreaming.Done()

err := gke.StreamContainerLog(ctx, cp.pods, cp.pod, "test", streams)
err := gke.StreamContainerLog(ctx, cp.pods, cp.Pod, "test", streams)
if err != nil {
panic(err)
}
Expand Down

0 comments on commit ab02964

Please sign in to comment.