@@ -28,7 +28,6 @@ import (
2828 "github.com/gavv/httpexpect/v2"
2929 "github.com/gruntwork-io/terratest/modules/k8s"
3030 "github.com/gruntwork-io/terratest/modules/testing"
31- "github.com/onsi/gomega"
3231 . "github.com/onsi/gomega" //nolint:staticcheck
3332 "go.uber.org/zap"
3433 corev1 "k8s.io/api/core/v1"
@@ -272,7 +271,7 @@ func waitExponentialBackoff(condFunc func() (bool, error)) error {
272271
273272func (f * Framework ) NewExpectResponse (httpBody any ) * httpexpect.Response {
274273 body , err := json .Marshal (httpBody )
275- f .GomegaT .Expect (err ).ShouldNot (gomega . HaveOccurred ())
274+ f .GomegaT .Expect (err ).ShouldNot (HaveOccurred ())
276275
277276 return httpexpect .NewResponse (f .GinkgoT , & http.Response {
278277 Header : http.Header {
@@ -287,15 +286,15 @@ func (f *Framework) ListPods(selector string) []corev1.Pod {
287286 pods , err := f .clientset .CoreV1 ().Pods (_namespace ).List (context .TODO (), metav1.ListOptions {
288287 LabelSelector : selector ,
289288 })
290- f .GomegaT .Expect (err ).ShouldNot (gomega . HaveOccurred (), "list pod: " , selector )
289+ f .GomegaT .Expect (err ).ShouldNot (HaveOccurred (), "list pod: " , selector )
291290 return pods .Items
292291}
293292
294293func (f * Framework ) ListRunningPods (selector string ) []corev1.Pod {
295294 pods , err := f .clientset .CoreV1 ().Pods (_namespace ).List (context .TODO (), metav1.ListOptions {
296295 LabelSelector : selector ,
297296 })
298- f .GomegaT .Expect (err ).ShouldNot (gomega . HaveOccurred (), "list pod: " , selector )
297+ f .GomegaT .Expect (err ).ShouldNot (HaveOccurred (), "list pod: " , selector )
299298 runningPods := make ([]corev1.Pod , 0 )
300299 for _ , p := range pods .Items {
301300 if p .Status .Phase == corev1 .PodRunning && p .DeletionTimestamp == nil {
@@ -324,7 +323,7 @@ func (f *Framework) ExecCommandInPod(podName string, cmd ...string) (string, str
324323
325324 var stdout , stderr bytes.Buffer
326325 exec , err := remotecommand .NewSPDYExecutor (f .restConfig , "POST" , req .URL ())
327- f .GomegaT .Expect (err ).ShouldNot (gomega . HaveOccurred (), "request kubernetes exec api" )
326+ f .GomegaT .Expect (err ).ShouldNot (HaveOccurred (), "request kubernetes exec api" )
328327 _ = exec .StreamWithContext (context .TODO (), remotecommand.StreamOptions {
329328 Stdin : nil ,
330329 Stdout : & stdout ,
@@ -338,13 +337,13 @@ func (f *Framework) GetPodLogs(name string, previous bool) string {
338337 Pods (_namespace ).
339338 GetLogs (name , & corev1.PodLogOptions {Previous : previous }).
340339 Stream (context .Background ())
341- f .GomegaT .Expect (err ).ShouldNot (gomega . HaveOccurred (), "get logs" )
340+ f .GomegaT .Expect (err ).ShouldNot (HaveOccurred (), "get logs" )
342341 defer func () {
343342 _ = reader .Close ()
344343 }()
345344
346345 logs , err := io .ReadAll (reader )
347- f .GomegaT .Expect (err ).ShouldNot (gomega . HaveOccurred (), "read all logs" )
346+ f .GomegaT .Expect (err ).ShouldNot (HaveOccurred (), "read all logs" )
348347
349348 return string (logs )
350349}
@@ -367,7 +366,7 @@ func (f *Framework) WaitPodsLog(selector, keyword string, sinceSeconds int64, ti
367366 opts .TailLines = ptr .To (int64 (0 ))
368367 }
369368 logStream , err := f .clientset .CoreV1 ().Pods (p .Namespace ).GetLogs (p .Name , & opts ).Stream (context .Background ())
370- f .GomegaT .Expect (err ).Should (gomega . BeNil ())
369+ f .GomegaT .Expect (err ).Should (BeNil ())
371370 scanner := bufio .NewScanner (logStream )
372371 scanner .Split (bufio .ScanLines )
373372 for scanner .Scan () {
0 commit comments