-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test if all the running pods are annotated for workload partitioning
Signed-off-by: Evgeny Slutsky <eslutsky@redhat.com>
- Loading branch information
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
*** Settings *** | ||
Documentation Tests for Workload Partioning | ||
Resource ../../resources/common.resource | ||
Resource ../../resources/microshift-process.resource | ||
Resource ../../resources/microshift-network.resource | ||
|
||
Suite Setup Setup Suite With Namespace | ||
Suite Teardown Teardown Suite With Namespace | ||
|
||
|
||
*** Test Cases *** | ||
Control Plane Pods Must Be Annotated | ||
[Documentation] Verify that all the Control Plane pods are properly annotated. | ||
All Pods Should Be Annotated As Management | ||
|
||
|
||
*** Keywords *** | ||
All Pods Should Be Annotated As Management | ||
[Documentation] Obtains list of Deployments created by CSV. | ||
${pods_raw}= Oc Get All Pods | ||
@{pods}= Split String ${pods_raw} | ||
FOR ${pod} IN @{pods} | ||
${ns} ${pod}= Split String ${pod} \@ | ||
${csv_dss}= Oc Get Pod Annotation ${ns} ${pod} | ||
END | ||
|
||
Oc Get Pod Annotation | ||
[Documentation] Run 'oc get' for a specific instance of a type in a namespace | ||
... with jsonpath provided. Returns output of the command without any parsing. | ||
[Arguments] ${ns} ${pod} | ||
${networks_str}= Oc Get JsonPath | ||
... pod | ||
... ${ns} | ||
... ${pod} | ||
... .metadata.annotations.target\\.workload\\.openshift\\.io/management | ||
Should Not Be Empty ${networks_str} | ||
|
||
Oc Get All Pods | ||
[Documentation] Runs 'oc get pods -A` | ||
... Returns the command output as formatted string <name-space>@<pod-name> | ||
${data}= Run With Kubeconfig | ||
... oc get pods -A -o jsonpath='{range .items[*]}{.metadata.namespace}{"@"}{.metadata.name}{"\\n"}{end}' | ||
RETURN ${data} |