Skip to content

Commit

Permalink
e2e: Replace redis operator to pipeline
Browse files Browse the repository at this point in the history
Redis is community supported operator which is not getting much
attention and because of this [0] it is failing. This PR replace it with
pipeline which is Red Hat supported and well maintained.

[0] redhat-openshift-ecosystem/community-operators-prod#2865
  • Loading branch information
praveenkumar committed Aug 3, 2023
1 parent c4dca26 commit e3b70c8
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 71 deletions.
20 changes: 9 additions & 11 deletions test/e2e/features/story_openshift.feature
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,12 @@ Feature: 4 Openshift stories
@darwin @linux @windows @testdata @story_marketplace @cleanup @needs_namespace
Scenario: Install new operator
Given executing "oc new-project testproj" succeeds
When executing "oc apply -f redis-sub.yaml" succeeds
Then with up to "20" retries with wait period of "30s" command "oc get csv" output matches ".*redis-operator\.(.*)Succeeded$"
# install redis operator
When executing "oc apply -f redis-cluster.yaml" succeeds
Then with up to "10" retries with wait period of "30s" command "oc get pods" output matches "redis-standalone-[a-z0-9]* .*Running.*"
When deleting a pod succeeds
Then stdout should match "^pod(.*)deleted$"
# after a while 1 pods should be up & running again
And with up to "10" retries with wait period of "30s" command "oc get pods" output matches "redis-standalone-[a-z0-9]* .*Running.*"


When executing "oc apply -f pipeline-sub.yaml" succeeds
Then with up to "10" retries with wait period of "30s" command "oc get csv" output matches ".*pipelines-operator(.*)Succeeded$"
When with up to "60" retries with wait period of "5s" command "oc explain task" output matches ".*KIND(.*)Task.*"
When with up to "60" retries with wait period of "5s" command "oc explain taskruns" output matches ".*KIND(.*)TaskRun.*"
# install tekton task
When executing "oc apply -f tekton-task.yaml" succeeds
Then with up to "60" retries with wait period of "5s" command "oc get taskruns" output matches "echo-task-run(.*)Succeeded.*"
When executing "oc logs --selector=tekton.dev/taskRun=echo-task-run" succeeds
Then stdout should contain "Hello World"
10 changes: 10 additions & 0 deletions test/testdata/pipeline-sub.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: openshift-pipelines-operator
namespace: openshift-operators
spec:
channel: latest
name: openshift-pipelines-operator-rh
source: redhat-operators
sourceNamespace: openshift-marketplace
49 changes: 0 additions & 49 deletions test/testdata/redis-cluster.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions test/testdata/redis-sub.yaml

This file was deleted.

20 changes: 20 additions & 0 deletions test/testdata/tekton-task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: echo-task
spec:
steps:
- image: registry.redhat.io/ubi7/ubi-minimal
name: echo
script: |
#!/bin/sh
echo "Hello World"
---
apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
name: echo-task-run
spec:
taskRef:
name: echo-task

0 comments on commit e3b70c8

Please sign in to comment.