Skip to content

Commit a0c0364

Browse files
Merge pull request #3369 from pmtk/olm/test-amq-broker
USHIFT-3172: OLM Test: Deploy AMQ Broker from RH Operators
2 parents b2848d5 + 7970586 commit a0c0364

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

test/assets/olm/catalog-source.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
apiVersion: operators.coreos.com/v1alpha1
22
kind: CatalogSource
33
metadata:
4-
name: redhat-community-catalog
4+
name: redhat-operators
55
namespace: openshift-marketplace
66
spec:
77
sourceType: grpc
8-
image: registry.redhat.io/redhat/community-operator-index:v4.16
9-
displayName: Red Hat Community Operators
8+
image: registry.redhat.io/redhat/redhat-operator-index:v4.16
9+
displayName: Red Hat Operators
1010
publisher: Red Hat
1111
grpcPodConfig:
1212
securityContextConfig: restricted
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
apiVersion: operators.coreos.com/v1alpha1
22
kind: Subscription
33
metadata:
4-
name: my-cert-manager
4+
name: amq-broker
55
namespace: openshift-operators
66
spec:
7-
channel: stable
8-
name: cert-manager
9-
source: redhat-community-catalog
7+
name: amq-broker-rhel8
8+
source: redhat-operators
109
sourceNamespace: openshift-marketplace

test/suites/optional/olm.robot

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,29 @@ Suite Teardown Teardown
1111

1212
*** Variables ***
1313
${CATALOG_SOURCE} ./assets/olm/catalog-source.yaml
14-
${SUB_CERT_MANAGER} ./assets/olm/subscription-cert-manager.yaml
14+
${SUBSCRIPTION} ./assets/olm/subscription.yaml
15+
${SUBSCRIPTION_NAME} amq-broker
1516
${MARKETPLACE_NAMESPACE} openshift-marketplace
1617
${OPERATORS_NAMESPACE} openshift-operators
1718

1819

1920
*** Test Cases ***
20-
Deploy CertManager From OperatorHubIO
21-
[Documentation] Deploy CertManager from OperatorHub Catalog.
21+
Deploy AmqBroker From Red Hat Operators catalog
22+
[Documentation] Deploy AMQ Broker from Red Hat Operators catalog.
2223
[Setup] Run Keywords
2324
... OLM Should Be Ready
2425
... Create CatalogSource
25-
... Create CertManager Subscription
26+
... Create Subscription
2627

27-
${csv}= Get CSV Name From Subscription ${OPERATORS_NAMESPACE} my-cert-manager
28+
${csv}= Get CSV Name From Subscription ${OPERATORS_NAMESPACE} ${SUBSCRIPTION_NAME}
2829
Wait For CSV ${OPERATORS_NAMESPACE} ${csv}
2930
@{deployments}= Get Deployments From CSV ${OPERATORS_NAMESPACE} ${csv}
3031
Wait For Deployments ${OPERATORS_NAMESPACE} @{deployments}
3132

3233
[Teardown] Run Keywords
3334
... Delete CatalogSource
3435
... AND
35-
... Delete CertManager Subscription
36+
... Delete Subscription
3637
... AND
3738
... Delete CSV ${OPERATORS_NAMESPACE} ${csv}
3839
... AND
@@ -61,19 +62,19 @@ Create CatalogSource
6162
[Documentation] Create CatalogSource resource with Red Hat Community Catalog Index.
6263
Oc Create -f ${CATALOG_SOURCE}
6364
Wait Until Keyword Succeeds 120s 5s
64-
... CatalogSource Should Be Ready ${MARKETPLACE_NAMESPACE} redhat-community-catalog
65+
... CatalogSource Should Be Ready ${MARKETPLACE_NAMESPACE} redhat-operators
6566

6667
CatalogSource Should Be Ready
6768
[Documentation] Checks if CatalogSource is ready.
6869
[Arguments] ${namespace} ${name}
6970
${catalog}= Oc Get catalogsources ${namespace} ${name}
7071
Should Be Equal As Strings READY ${catalog.status.connectionState.lastObservedState}
7172

72-
Create CertManager Subscription
73-
[Documentation] Creates cert-manager subscription.
74-
Oc Create -f ${SUB_CERT_MANAGER}
73+
Create Subscription
74+
[Documentation] Creates subscription.
75+
Oc Create -f ${SUBSCRIPTION}
7576
Wait Until Keyword Succeeds 120s 5s
76-
... Subscription Should Be AtLatestKnown ${OPERATORS_NAMESPACE} my-cert-manager
77+
... Subscription Should Be AtLatestKnown ${OPERATORS_NAMESPACE} ${SUBSCRIPTION_NAME}
7778

7879
Subscription Should Be AtLatestKnown
7980
[Documentation] Checks if subscription has state "AtLeastKnown"
@@ -84,7 +85,7 @@ Subscription Should Be AtLatestKnown
8485
Get CSV Name From Subscription
8586
[Documentation] Obtains Subscription's CSV name.
8687
[Arguments] ${namespace} ${name}
87-
${sub}= Oc Get subscriptions.operators.coreos.com ${OPERATORS_NAMESPACE} my-cert-manager
88+
${sub}= Oc Get subscriptions.operators.coreos.com ${OPERATORS_NAMESPACE} ${SUBSCRIPTION_NAME}
8889
RETURN ${sub.status.currentCSV}
8990

9091
Wait For CSV
@@ -122,9 +123,9 @@ Delete CatalogSource
122123
[Documentation] Delete CatalogSource.
123124
Oc Delete -f ${CATALOG_SOURCE}
124125

125-
Delete CertManager Subscription
126-
[Documentation] Delete CertManager Subscription.
127-
Oc Delete -f ${SUB_CERT_MANAGER}
126+
Delete Subscription
127+
[Documentation] Delete Subscription.
128+
Oc Delete -f ${SUBSCRIPTION}
128129

129130
Delete CSV
130131
[Documentation] Delete CSV.

0 commit comments

Comments
 (0)