@@ -20,7 +20,6 @@ import (
2020 "fmt"
2121 "os"
2222 "path/filepath"
23- "strings"
2423 "time"
2524
2625 "github.com/intel/intel-device-plugins-for-kubernetes/test/e2e/utils"
@@ -66,31 +65,40 @@ func describe() {
6665 fmw .NamespacePodSecurityEnforceLevel = admissionapi .LevelPrivileged
6766
6867 ginkgo .AfterEach (func (ctx context.Context ) {
69- ginkgo .By ("undeploying fpga daemonset and mapping " )
68+ ginkgo .By ("undeploying eeeeverything " )
7069
7170 e2ekubectl .RunKubectlOrDie (fmw .Namespace .Name , "delete" , "-f" , mappingsCollectionPath )
7271
72+ ginkgo .By ("undeployed mappings" )
73+
7374 pods , err := e2epod .GetPodsInNamespace (ctx , fmw .ClientSet , fmw .Namespace .Name , nil )
7475 if err != nil {
7576 framework .Failf ("Failed to list pods in namespace: %+v" , err )
7677 }
7778
79+ ginkgo .By ("trying to find Pods" )
80+
7881 dpPodName := ""
7982
8083 for _ , pod := range pods {
81- if strings . HasPrefix ( pod .Name , "intel-fpga-plugin" ) {
84+ if pod .Labels [ "app" ] == "intel-fpga-plugin" {
8285 dpPodName = pod .Name
86+
8387 break
8488 }
8589 }
8690
91+ ginkgo .By (fmt .Sprintf ("pod name found maybe: %s" , dpPodName ))
92+
8793 if dpPodName != "" {
8894 e2ekubectl .RunKubectlOrDie (fmw .Namespace .Name , "delete" , "ds" , "intel-fpga-plugin" )
8995
9096 if err := e2epod .WaitForPodNotFoundInNamespace (ctx , fmw .ClientSet , dpPodName , fmw .Namespace .Name , 30 * time .Second ); err != nil {
9197 framework .Failf ("failed to terminate pod: %v" , err )
9298 }
9399 }
100+
101+ ginkgo .By ("Done with all of this" )
94102 })
95103
96104 ginkgo .Context ("When FPGA plugin is running in region mode [Mode:region]" , func () {
0 commit comments