Skip to content

Commit f0619ff

Browse files
authored
Update GPU add-on testing for new SKU (#412)
* Update GPU add-on testing for new SKU Signed-off-by: Luca Giorgi <[email protected]> * bump CUDA version Signed-off-by: Luca Giorgi <[email protected]> * Cleanup post-install TC Signed-off-by: Luca Giorgi <[email protected]> * shift to openshiftlibrary Signed-off-by: Luca Giorgi <[email protected]> * update variable capitalization Signed-off-by: Luca Giorgi <[email protected]> * update argument capitalization Signed-off-by: Luca Giorgi <[email protected]>
1 parent 3830ae8 commit f0619ff

File tree

5 files changed

+50
-39
lines changed

5 files changed

+50
-39
lines changed

tests/Resources/OCP.resource

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,50 @@
11
*** Settings ***
22
Documentation Set of Keywords for OCP checks
3-
Library OpenShiftCLI
3+
Library OpenShiftLibrary
44

55

66
*** Keywords ***
77
Verify DaemonSet Status
88
[Documentation] Verifies that a DaemonSet exists, and that the number
99
... of available pods matches the number of desired pods
10-
[Arguments] ${label} ${DSName}
11-
@{DS_obj} = OpenShiftCLI.Get kind=DaemonSet label_selector=${label}
12-
&{DS_obj_dictionary} = Set Variable ${DS_obj}[0]
13-
Should Match ${DS_obj_dictionary.metadata.name} ${DSName}
14-
Should Be Equal ${DS_obj_dictionary.status.desiredNumberScheduled} ${DS_obj_dictionary.status.numberAvailable}
10+
[Arguments] ${label} ${dsname}
11+
@{ds_obj} = OpenShiftLibrary.Oc Get kind=DaemonSet label_selector=${label}
12+
&{ds_obj_dictionary} = Set Variable ${ds_obj}[0]
13+
Should Match ${ds_obj_dictionary.metadata.name} ${dsname}
14+
Should Be Equal ${ds_obj_dictionary.status.desiredNumberScheduled} ${ds_obj_dictionary.status.numberAvailable}
1515

1616
Verify Deployment Status
1717
[Documentation] Verifies that a Deployment exists, and that its status
1818
... is "Available"
19-
[Arguments] ${label} ${DName}
20-
@{D_obj} = OpenShiftCLI.Get kind=Deployment label_selector=${label}
21-
&{D_obj_dictionary} = Set Variable ${D_obj}[0]
22-
Should Match ${D_obj_dictionary.metadata.name} ${DName}
23-
Should Be Equal ${D_obj_dictionary.status.conditions[0].type} Available
19+
[Arguments] ${label} ${dname}
20+
@{d_obj} = OpenShiftLibrary.Oc Get kind=Deployment label_selector=${label}
21+
&{d_obj_dictionary} = Set Variable ${d_obj}[0]
22+
Should Match ${d_obj_dictionary.metadata.name} ${dname}
23+
Should Be Equal ${d_obj_dictionary.status.conditions[0].type} Available
2424

2525
Verify Operator Status
2626
[Documentation] Verifies that an Operator exists, that its status
2727
... is "Succeeded" and that the name matches
2828
[Arguments] ${label} ${operator_name}
29-
@{Op_obj} = OpenShiftCLI.Get kind=ClusterServiceVersion label_selector=${label}
30-
&{Op_obj_dictionary} = Set Variable ${Op_obj}[0]
31-
Should Match ${Op_obj_dictionary.metadata.name} ${operator_name}
32-
Should Be Equal ${Op_obj_dictionary.status.phase} Succeeded
29+
@{op_obj} = OpenShiftLibrary.Oc Get kind=ClusterServiceVersion label_selector=${label}
30+
&{op_obj_dictionary} = Set Variable ${op_obj}[0]
31+
Should Match ${op_obj_dictionary.metadata.name} ${operator_name}
32+
Should Be Equal ${op_obj_dictionary.status.phase} Succeeded
3333

3434
Verify Namespace Status
3535
[Documentation] Verifies that a Namespace exists, and that its status
3636
... is "Active"
3737
[Arguments] ${label}
38-
@{NS_obj} = OpenShiftCLI.Get kind=Namespace label_selector=${label}
39-
&{NS_obj_dictionary} = Set Variable ${NS_obj}[0]
40-
Should Be Equal ${NS_obj_dictionary.status.phase} Active
38+
@{ns_obj} = OpenShiftLibrary.Oc Get kind=Namespace label_selector=${label}
39+
&{ns_obj_dictionary} = Set Variable ${ns_obj}[0]
40+
Should Be Equal ${ns_obj_dictionary.status.phase} Active
41+
42+
Verify CR Status
43+
[Documentation] Verifies that a CR exists, that it's available
44+
... and that the name matches
45+
[Arguments] ${crd} ${cr_name}
46+
@{cr_obj} = OpenShiftLibrary.Oc Get kind=${crd}
47+
&{cr_obj_dictionary} = Set Variable ${cr_obj}[0]
48+
Should Match ${cr_obj_dictionary.metadata.name} ${cr_name}
49+
Should Be Equal ${cr_obj_dictionary.status.conditions[0].type} Available
50+
Should Be Equal ${cr_obj_dictionary.status.conditions[0].status} True

tests/Tests/100__deploy/100__installation/102__post_install.robot

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,31 +45,32 @@ Verify GPU Operator Deployment # robocop: disable
4545
4646
# Before GPU Node is added to the cluster
4747
# NS
48-
Verify Namespace Status label=kubernetes.io/metadata.name=redhat-gpu-operator
48+
Verify Namespace Status label=kubernetes.io/metadata.name=redhat-nvidia-gpu-addon
4949
# Node-Feature-Discovery Operator
50-
Verify Operator Status label=operators.coreos.com/node-feature-discovery-operator.redhat-gpu-operator
51-
... operator_name=node-feature-discovery-operator.v*
50+
Verify Operator Status label=operators.coreos.com/nfd.redhat-nvidia-gpu-addon
51+
... operator_name=nfd.v*
5252
# GPU Operator
53-
Verify Operator Status label=operators.coreos.com/gpu-operator-certified-addon.redhat-gpu-operator
54-
... operator_name=gpu-operator-certified-addon.v*
53+
Verify Operator Status label=operators.coreos.com/gpu-operator-certified.redhat-nvidia-gpu-addon
54+
... operator_name=gpu-operator-certified.v*
5555
# nfd-controller-manager
56-
Verify Deployment Status label=operators.coreos.com/node-feature-discovery-operator.redhat-gpu-operator
57-
... DName=nfd-controller-manager
56+
Verify Deployment Status label=operators.coreos.com/nfd.redhat-nvidia-gpu-addon
57+
... dname=nfd-controller-manager
5858
# nfd-master
59-
Verify DaemonSet Status label=app=nfd-master DSName=nfd-master
59+
Verify DaemonSet Status label=app=nfd-master dsname=nfd-master
6060
# nfd-worker
61-
Verify DaemonSet Status label=app=nfd-worker DSName=nfd-worker
61+
Verify DaemonSet Status label=app=nfd-worker dsname=nfd-worker
6262

6363
# After GPU Node is added to the cluster
64-
# TODO: gpu-feature-discovery DS
65-
# ... nvidia-container-toolkit-daemonset DS
66-
# ... gpu-cluster-policy CP
67-
# ... nvidia-dcgm-exporter DS
68-
# ... nvidia-dcgm DS
69-
# ... nvidia-device-plugin-daemonset DS
70-
# ... nvidia-driver-daemonset-49.84.202201212103-0 DS
71-
# ... nvidia-node-status-exporter DS
72-
# ... nvidia-operator-validator DS
64+
Verify DaemonSet Status label=app=gpu-feature-discovery dsname=gpu-feature-discovery
65+
Verify DaemonSet Status label=app=nvidia-container-toolkit-daemonset dsname=nvidia-container-toolkit-daemonset
66+
Verify DaemonSet Status label=app=nvidia-dcgm-exporter dsname=nvidia-dcgm-exporter
67+
Verify DaemonSet Status label=app=nvidia-dcgm dsname=nvidia-dcgm
68+
Verify DaemonSet Status label=app=nvidia-device-plugin-daemonset dsname=nvidia-device-plugin-daemonset
69+
#app=nvidia-driver-daemonset-410.84.202205191234-0
70+
#Verify DaemonSet Status label=app=nvidia-driver-daemonset-* dsname=nvidia-driver-daemonset-*
71+
Verify DaemonSet Status label=app=nvidia-node-status-exporter dsname=nvidia-node-status-exporter
72+
Verify DaemonSet Status label=app=nvidia-operator-validator dsname=nvidia-operator-validator
73+
Verify CR Status crd=NodeFeatureDiscovery cr_name=ocp-gpu-addon
7374

7475
Verify That Prometheus Image Is A CPaaS Built Image
7576
[Documentation] Verifies the images used for prometheus

tests/Tests/500__jupyterhub/minimal-cuda-test.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Force Tags JupyterHub
1313

1414
*** Variables ***
1515
${NOTEBOOK_IMAGE} = minimal-gpu
16-
${EXPECTED_CUDA_VERSION} = 11.4
16+
${EXPECTED_CUDA_VERSION} = 11.6
1717

1818

1919
*** Test Cases ***

tests/Tests/500__jupyterhub/minimal-pytorch-test.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Force Tags JupyterHub
1414

1515
*** Variables ***
1616
${NOTEBOOK_IMAGE} = pytorch
17-
${EXPECTED_CUDA_VERSION} = 11.4
17+
${EXPECTED_CUDA_VERSION} = 11.6
1818

1919

2020
*** Test Cases ***

tests/Tests/500__jupyterhub/minimal-tensorflow-test.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Force Tags JupyterHub
1515

1616
*** Variables ***
1717
${NOTEBOOK_IMAGE} = tensorflow
18-
${EXPECTED_CUDA_VERSION} = 11.4
18+
${EXPECTED_CUDA_VERSION} = 11.6
1919

2020

2121
*** Test Cases ***

0 commit comments

Comments
 (0)