Skip to content

Commit 9ccdbf3

Browse files
e2e: add labels for device, resource, mode, app
Signed-off-by: Hyeongju Johannes Lee <[email protected]>
1 parent b38141d commit 9ccdbf3

File tree

8 files changed

+94
-34
lines changed

8 files changed

+94
-34
lines changed

test/e2e/dlb/dlb.go

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const (
3939
)
4040

4141
func init() {
42-
ginkgo.Describe("DLB plugin", describe)
42+
ginkgo.Describe("DLB plugin [Device:dlb]", describe)
4343
}
4444

4545
func describe() {
@@ -81,30 +81,38 @@ func describe() {
8181
}
8282
})
8383

84-
ginkgo.Context("When PF resources are available", func() {
84+
ginkgo.Context("When PF resources are available [Resource:pf]", func() {
8585
ginkgo.BeforeEach(func(ctx context.Context) {
8686
resource := v1.ResourceName("dlb.intel.com/pf")
8787
if err := utils.WaitForNodesWithResource(ctx, f.ClientSet, resource, 30*time.Second); err != nil {
8888
framework.Failf("unable to wait for nodes to have positive allocatable resource %s: %v", resource, err)
8989
}
9090
})
9191

92-
ginkgo.It("can run demo app", func(ctx context.Context) {
92+
ginkgo.It("can run demo app [App:libdlb]", func(ctx context.Context) {
9393
runDemoApp(ctx, "PF", demoPFYaml, f)
9494
})
95+
96+
ginkgo.When("there is no app to run [App:noapp]", func() {
97+
ginkgo.It("does nothing", func() {})
98+
})
9599
})
96100

97-
ginkgo.Context("When VF resources are available", func() {
101+
ginkgo.Context("When VF resources are available [Resource:vf]", func() {
98102
ginkgo.BeforeEach(func(ctx context.Context) {
99103
resource := v1.ResourceName("dlb.intel.com/vf")
100104
if err := utils.WaitForNodesWithResource(ctx, f.ClientSet, resource, 30*time.Second); err != nil {
101105
framework.Failf("unable to wait for nodes to have positive allocatable resource %s: %v", resource, err)
102106
}
103107
})
104108

105-
ginkgo.It("can run demo app", func(ctx context.Context) {
109+
ginkgo.It("can run demo app [App:libdlb]", func(ctx context.Context) {
106110
runDemoApp(ctx, "VF", demoVFYaml, f)
107111
})
112+
113+
ginkgo.When("there is no app to run [App:noapp]", func() {
114+
ginkgo.It("does nothing", func() {})
115+
})
108116
})
109117
}
110118

test/e2e/dsa/dsa.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const (
4040
)
4141

4242
func init() {
43-
ginkgo.Describe("DSA plugin", describe)
43+
ginkgo.Describe("DSA plugin [Device:dsa]", describe)
4444
}
4545

4646
func describe() {
@@ -94,20 +94,24 @@ func describe() {
9494
}
9595
})
9696

97-
ginkgo.Context("When DSA resources are available", func() {
97+
ginkgo.Context("When DSA resources are available [Resource:dedicated]", func() {
9898
ginkgo.BeforeEach(func(ctx context.Context) {
9999
ginkgo.By("checking if the resource is allocatable")
100100
if err := utils.WaitForNodesWithResource(ctx, f.ClientSet, "dsa.intel.com/wq-user-dedicated", 300*time.Second); err != nil {
101101
framework.Failf("unable to wait for nodes to have positive allocatable resource: %v", err)
102102
}
103103
})
104104

105-
ginkgo.It("deploys a demo app", func(ctx context.Context) {
105+
ginkgo.It("deploys a demo app [App:accel-config]", func(ctx context.Context) {
106106
e2ekubectl.RunKubectlOrDie(f.Namespace.Name, "apply", "-f", demoPath)
107107

108108
ginkgo.By("waiting for the DSA demo to succeed")
109109
err := e2epod.WaitForPodSuccessInNamespaceTimeout(ctx, f.ClientSet, podName, f.Namespace.Name, 200*time.Second)
110110
gomega.Expect(err).To(gomega.BeNil(), utils.GetPodLogs(ctx, f, podName, podName))
111111
})
112+
113+
ginkgo.When("there is no app to run [App:noapp]", func() {
114+
ginkgo.It("does nothing", func() {})
115+
})
112116
})
113117
}

test/e2e/fpga/fpga.go

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const (
4747
)
4848

4949
func init() {
50-
ginkgo.Describe("FPGA Plugin", describe)
50+
ginkgo.Describe("FPGA Plugin [Device:fpga]", describe)
5151
}
5252

5353
func describe() {
@@ -64,23 +64,43 @@ func describe() {
6464
fmw := framework.NewDefaultFramework("fpgaplugin-e2e")
6565
fmw.NamespacePodSecurityEnforceLevel = admissionapi.LevelPrivileged
6666

67-
ginkgo.Context("When FPGA plugin is running in region mode", func() {
67+
ginkgo.Context("When FPGA plugin is running in region mode [Mode:region]", func() {
6868
ginkgo.BeforeEach(func(ctx context.Context) {
6969
runDevicePlugin(ctx, fmw, pluginKustomizationPath, mappingsCollectionPath, arria10NodeResource, "region")
7070
})
71-
ginkgo.It("runs an opae-nlb-demo pod two times", func(ctx context.Context) {
71+
ginkgo.It("runs an opae-nlb-demo pod two times [App:opae-nlb-demo]", func(ctx context.Context) {
7272
runTestCase(ctx, fmw, "region", nlb3PodResource, "nlb3", "nlb0")
7373
runTestCase(ctx, fmw, "region", nlb0PodResource, "nlb0", "nlb3")
7474
})
7575
})
7676

77-
ginkgo.Context("When FPGA plugin is running in af mode", func() {
77+
ginkgo.Context("When FPGA plugin is running in af mode [Mode:af]", func() {
7878
ginkgo.BeforeEach(func(ctx context.Context) {
7979
runDevicePlugin(ctx, fmw, pluginKustomizationPath, mappingsCollectionPath, nlb0NodeResource, "af")
8080
})
81-
ginkgo.It("runs an opae-nlb-demo pod", func(ctx context.Context) {
81+
ginkgo.It("runs an opae-nlb-demo pod [App:opae-nlb-demo]", func(ctx context.Context) {
8282
runTestCase(ctx, fmw, "af", nlb0PodResourceAF, "nlb0", "nlb3")
8383
})
84+
85+
ginkgo.When("there is no app to run [App:noapp]", func() {
86+
ginkgo.It("does nothing", func() {})
87+
})
88+
})
89+
90+
ginkgo.Context("When FPGA plugin is running in region mode [Mode:region]", func() {
91+
ginkgo.BeforeEach(func(ctx context.Context) {
92+
runDevicePlugin(ctx, fmw, pluginKustomizationPath, mappingsCollectionPath, arria10NodeResource, "region")
93+
})
94+
ginkgo.It("runs [App:opae-nlb-demo]", func(ctx context.Context) {
95+
runTestCase(ctx, fmw, "region", nlb3PodResource, "nlb3", "nlb0")
96+
})
97+
ginkgo.It("runs an opae-nlb-demo pod [App:opae-nlb-demo]", func(ctx context.Context) {
98+
runTestCase(ctx, fmw, "region", nlb0PodResource, "nlb0", "nlb3")
99+
})
100+
101+
ginkgo.When("there is no app to run [App:noapp]", func() {
102+
ginkgo.It("does nothing", func() {})
103+
})
84104
})
85105
}
86106

test/e2e/gpu/gpu.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const (
4343
)
4444

4545
func init() {
46-
ginkgo.Describe("GPU plugin", describe)
46+
ginkgo.Describe("GPU plugin [Device:gpu]", describe)
4747
}
4848

4949
func describe() {
@@ -74,14 +74,14 @@ func describe() {
7474
}
7575
})
7676

77-
ginkgo.Context("When GPU resources are available", func() {
77+
ginkgo.Context("When GPU resources are available [Resource:i915]", func() {
7878
ginkgo.BeforeEach(func(ctx context.Context) {
7979
ginkgo.By("checking if the resource is allocatable")
8080
if err := utils.WaitForNodesWithResource(ctx, f.ClientSet, "gpu.intel.com/i915", 30*time.Second); err != nil {
8181
framework.Failf("unable to wait for nodes to have positive allocatable resource: %v", err)
8282
}
8383
})
84-
ginkgo.It("checks availability of GPU resources", func(ctx context.Context) {
84+
ginkgo.It("checks availability of GPU resources [App:busybox]", func(ctx context.Context) {
8585
ginkgo.By("submitting a pod requesting GPU resources")
8686
podSpec := &v1.Pod{
8787
ObjectMeta: metav1.ObjectMeta{Name: "gpuplugin-tester"},
@@ -122,7 +122,7 @@ func describe() {
122122
framework.Logf("found card and renderD from the log")
123123
})
124124

125-
ginkgo.It("run a small workload on the GPU", func(ctx context.Context) {
125+
ginkgo.It("run a small workload on the GPU [App:tensorflow]", func(ctx context.Context) {
126126
kustomYaml, err := utils.LocateRepoFile(tfKustomizationYaml)
127127
if err != nil {
128128
framework.Failf("unable to locate %q: %v", tfKustomizationYaml, err)
@@ -139,5 +139,9 @@ func describe() {
139139

140140
framework.Logf("tensorflow execution succeeded!")
141141
})
142+
143+
ginkgo.When("there is no app to run [App:noapp]", func() {
144+
ginkgo.It("does nothing", func() {})
145+
})
142146
})
143147
}

test/e2e/iaa/iaa.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const (
4040
)
4141

4242
func init() {
43-
ginkgo.Describe("IAA plugin", describe)
43+
ginkgo.Describe("IAA plugin [Device:iaa]", describe)
4444
}
4545

4646
func describe() {
@@ -94,20 +94,24 @@ func describe() {
9494
}
9595
})
9696

97-
ginkgo.Context("When IAA resources are available", func() {
97+
ginkgo.Context("When IAA resources are available [Resource:dedicated]", func() {
9898
ginkgo.BeforeEach(func(ctx context.Context) {
9999
ginkgo.By("checking if the resource is allocatable")
100100
if err := utils.WaitForNodesWithResource(ctx, f.ClientSet, "iaa.intel.com/wq-user-dedicated", 300*time.Second); err != nil {
101101
framework.Failf("unable to wait for nodes to have positive allocatable resource: %v", err)
102102
}
103103
})
104104

105-
ginkgo.It("deploys a demo app", func(ctx context.Context) {
105+
ginkgo.It("deploys a demo app [App:accel-config]", func(ctx context.Context) {
106106
e2ekubectl.RunKubectlOrDie(f.Namespace.Name, "apply", "-f", demoPath)
107107

108108
ginkgo.By("waiting for the IAA demo to succeed")
109109
err := e2epod.WaitForPodSuccessInNamespaceTimeout(ctx, f.ClientSet, podName, f.Namespace.Name, 300*time.Second)
110110
gomega.Expect(err).To(gomega.BeNil(), utils.GetPodLogs(ctx, f, podName, podName))
111111
})
112+
113+
ginkgo.When("there is no app to run [App:noapp]", func() {
114+
ginkgo.It("does nothing", func() {})
115+
})
112116
})
113117
}

test/e2e/qat/qatplugin_dpdk.go

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const (
5454
)
5555

5656
func init() {
57-
ginkgo.Describe("QAT plugin in DPDK mode", describeQatDpdkPlugin)
57+
ginkgo.Describe("QAT plugin in DPDK mode [Device:qat] [Mode:dpdk]", describeQatDpdkPlugin)
5858
}
5959

6060
func describeQatDpdkPlugin() {
@@ -118,7 +118,7 @@ func describeQatDpdkPlugin() {
118118
}
119119
})
120120

121-
ginkgo.Context("When QAT Gen4 resources are available with crypto (cy) services enabled", func() {
121+
ginkgo.Context("When QAT Gen4 resources are available with crypto (cy) services enabled [Resource:cy]", func() {
122122
// This BeforeEach runs even before the JustBeforeEach above.
123123
ginkgo.BeforeEach(func() {
124124
ginkgo.By("creating a configMap before plugin gets deployed")
@@ -128,21 +128,25 @@ func describeQatDpdkPlugin() {
128128
resourceName = "qat.intel.com/cy"
129129
})
130130

131-
ginkgo.It("deploys a crypto pod (openssl) requesting QAT resources", func(ctx context.Context) {
131+
ginkgo.It("deploys a crypto pod (openssl) requesting QAT resources [App:openssl]", func(ctx context.Context) {
132132
runCpaSampleCode(ctx, f, symmetric, resourceName)
133133
})
134134

135-
ginkgo.It("deploys a crypto pod (dpdk crypto-perf) requesting QAT resources", func(ctx context.Context) {
135+
ginkgo.It("deploys a crypto pod (dpdk crypto-perf) requesting QAT resources [App:crypto-perf]", func(ctx context.Context) {
136136
ginkgo.By("submitting a crypto pod requesting QAT resources")
137137
e2ekubectl.RunKubectlOrDie(f.Namespace.Name, "apply", "-k", filepath.Dir(cryptoTestGen4YamlPath))
138138

139139
ginkgo.By("waiting the crypto pod to finish successfully")
140140
err := e2epod.WaitForPodSuccessInNamespaceTimeout(ctx, f.ClientSet, "qat-dpdk-test-crypto-perf-tc1-gen4", f.Namespace.Name, 300*time.Second)
141141
gomega.Expect(err).To(gomega.BeNil(), utils.GetPodLogs(ctx, f, "qat-dpdk-test-crypto-perf-tc1-gen4", "crypto-perf"))
142142
})
143+
144+
ginkgo.When("there is no app to run [App:noapp]", func() {
145+
ginkgo.It("does nothing", func() {})
146+
})
143147
})
144148

145-
ginkgo.Context("When QAT Gen4 resources are available with compress (dc) services enabled", func() {
149+
ginkgo.Context("When QAT Gen4 resources are available with compress (dc) services enabled [Resource:dc]", func() {
146150
ginkgo.BeforeEach(func() {
147151
ginkgo.By("creating a configMap before plugin gets deployed")
148152
e2ekubectl.RunKubectlOrDie(f.Namespace.Name, "create", "configmap", "--from-literal", "qat.conf=ServicesEnabled=dc", "qat-config")
@@ -151,18 +155,22 @@ func describeQatDpdkPlugin() {
151155
resourceName = "qat.intel.com/dc"
152156
})
153157

154-
ginkgo.It("deploys a compress pod (openssl) requesting QAT resources", func(ctx context.Context) {
158+
ginkgo.It("deploys a compress pod (openssl) requesting QAT resources [App:openssl]", func(ctx context.Context) {
155159
runCpaSampleCode(ctx, f, compression, resourceName)
156160
})
161+
162+
ginkgo.When("there is no app to run [App:noapp]", func() {
163+
ginkgo.It("does nothing", func() {})
164+
})
157165
})
158166

159-
ginkgo.Context("When QAT Gen2 resources are available", func() {
167+
ginkgo.Context("When QAT Gen2 resources are available [Resource:generic]", func() {
160168
ginkgo.BeforeEach(func() {
161169
ginkgo.By("setting resourceName for Gen2 resources")
162170
resourceName = "qat.intel.com/generic"
163171
})
164172

165-
ginkgo.It("deploys a crypto pod requesting QAT resources", func(ctx context.Context) {
173+
ginkgo.It("deploys a crypto pod requesting QAT resources [App:crypto-perf]", func(ctx context.Context) {
166174
ginkgo.By("submitting a crypto pod requesting QAT resources")
167175
e2ekubectl.RunKubectlOrDie(f.Namespace.Name, "apply", "-k", filepath.Dir(cryptoTestYamlPath))
168176

@@ -172,7 +180,7 @@ func describeQatDpdkPlugin() {
172180
gomega.Expect(err).To(gomega.BeNil(), utils.GetPodLogs(ctx, f, demoPodName, demoPodContainerName))
173181
})
174182

175-
ginkgo.It("deploys a compress pod requesting QAT resources", func(ctx context.Context) {
183+
ginkgo.It("deploys a compress pod requesting QAT resources [App:compress-perf]", func(ctx context.Context) {
176184
ginkgo.By("submitting a compress pod requesting QAT resources")
177185
e2ekubectl.RunKubectlOrDie(f.Namespace.Name, "apply", "-k", filepath.Dir(compressTestYamlPath))
178186

@@ -181,6 +189,10 @@ func describeQatDpdkPlugin() {
181189
err := e2epod.WaitForPodSuccessInNamespaceTimeout(ctx, f.ClientSet, demoPodName, f.Namespace.Name, 60*time.Second)
182190
gomega.Expect(err).To(gomega.BeNil(), utils.GetPodLogs(ctx, f, demoPodName, demoPodContainerName))
183191
})
192+
193+
ginkgo.When("there is no app to run [App:noapp]", func() {
194+
ginkgo.It("does nothing", func() {})
195+
})
184196
})
185197
}
186198

test/e2e/qat/qatplugin_kernel.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const (
3737
)
3838

3939
func init() {
40-
ginkgo.Describe("QAT plugin in kernel mode", describeQatKernelPlugin)
40+
ginkgo.Describe("QAT plugin in kernel mode [Device:qat] [Mode:kernel]", describeQatKernelPlugin)
4141
}
4242

4343
func describeQatKernelPlugin() {
@@ -79,15 +79,15 @@ func describeQatKernelPlugin() {
7979
}
8080
})
8181

82-
ginkgo.Context("When QAT resources are available", func() {
82+
ginkgo.Context("When QAT resources are available [Resource:cy1_dc0]", func() {
8383
ginkgo.BeforeEach(func(ctx context.Context) {
8484
ginkgo.By("checking if the resource is allocatable")
8585
if err := utils.WaitForNodesWithResource(ctx, f.ClientSet, "qat.intel.com/cy1_dc0", 30*time.Second); err != nil {
8686
framework.Failf("unable to wait for nodes to have positive allocatable resource: %v", err)
8787
}
8888
})
8989

90-
ginkgo.It("deploys a pod requesting QAT resources", func(ctx context.Context) {
90+
ginkgo.It("deploys a pod requesting QAT resources [App:busybox]", func(ctx context.Context) {
9191
ginkgo.By("submitting a pod requesting QAT resources")
9292
podSpec := &v1.Pod{
9393
ObjectMeta: metav1.ObjectMeta{Name: "qatplugin-tester"},
@@ -114,5 +114,9 @@ func describeQatKernelPlugin() {
114114
ginkgo.By("waiting the pod to finish successfully")
115115
e2epod.NewPodClient(f).WaitForFinish(ctx, pod.ObjectMeta.Name, 60*time.Second)
116116
})
117+
118+
ginkgo.When("there is no app to run [App:noapp]", func() {
119+
ginkgo.It("does nothing", func() {})
120+
})
117121
})
118122
}

test/e2e/sgx/sgx.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const (
4141
)
4242

4343
func init() {
44-
ginkgo.Describe("SGX plugin", describe)
44+
ginkgo.Describe("SGX plugin [Device:sgx]", describe)
4545
}
4646

4747
func describe() {
@@ -93,7 +93,7 @@ func describe() {
9393
}
9494
})
9595

96-
ginkgo.It("deploys a sgx-sdk-demo pod requesting SGX enclave resources", func(ctx context.Context) {
96+
ginkgo.It("deploys a sgx-sdk-demo pod requesting SGX enclave resources [App:sgx-sdk-demo]", func(ctx context.Context) {
9797
podSpec := &v1.Pod{
9898
ObjectMeta: metav1.ObjectMeta{Name: "sgxplugin-tester"},
9999
Spec: v1.PodSpec{
@@ -119,6 +119,10 @@ func describe() {
119119
err = e2epod.WaitForPodSuccessInNamespaceTimeout(ctx, f.ClientSet, pod.ObjectMeta.Name, f.Namespace.Name, 60*time.Second)
120120
gomega.Expect(err).To(gomega.BeNil(), utils.GetPodLogs(ctx, f, pod.ObjectMeta.Name, "testcontainer"))
121121
})
122+
123+
ginkgo.When("there is no app to run [App:noapp]", func() {
124+
ginkgo.It("does nothing", func() {})
125+
})
122126
})
123127

124128
ginkgo.AfterEach(func() {

0 commit comments

Comments
 (0)