@@ -28,6 +28,8 @@ import (
2828)
2929
3030const (
31+ ns = "inteldeviceplugins-system"
32+ timeout = time .Second * 120
3133 kustomizationYaml = "deployments/dsa_plugin/overlays/dsa_initcontainer/dsa_initcontainer.yaml"
3234 configmapYaml = "demo/dsa.conf"
3335 demoYaml = "demo/dsa-accel-config-demo-pod.yaml"
@@ -96,4 +98,26 @@ func describe() {
9698
9799 framework .Logf ("log output: %s" , log )
98100 })
101+
102+ ginkgo .It ("deploys DSA plugin with operator" , func () {
103+ utils .Kubectl ("" , "apply" , "-k" , "deployments/operator/default/kustomization.yaml" )
104+
105+ if _ , err := e2epod .WaitForPodsWithLabelRunningReady (f .ClientSet , ns , labels.Set {"control-plane" : "controller-manager" }.AsSelector (), 1 , timeout ); err != nil {
106+ framework .Failf ("unable to wait for all pods to be running and ready: %v" , err )
107+ }
108+
109+ utils .Kubectl ("" , "apply" , "-f" , "deployments/operator/samples/deviceplugin_v1_dsadeviceplugin.yaml" )
110+
111+ if _ , err := e2epod .WaitForPodsWithLabelRunningReady (f .ClientSet , ns , labels.Set {"app" : "intel-dsa-plugin" }.AsSelector (), 1 , timeout ); err != nil {
112+ framework .Failf ("unable to wait for all pods to be running and ready: %v" , err )
113+ }
114+
115+ if err := utils .WaitForNodesWithResource (f .ClientSet , "dsa.intel.com/wq-user-dedicated" , timeout ); err != nil {
116+ framework .Failf ("unable to wait for nodes to have positive allocatable resource: %v" , err )
117+ }
118+
119+ utils .Kubectl ("" , "delete" , "-f" , "deployments/operator/samples/deviceplugin_v1_dsadeviceplugin.yaml" )
120+
121+ utils .Kubectl ("" , "delete" , "-k" , "deployments/operator/default/kustomization.yaml" )
122+ })
99123}
0 commit comments