Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing mongo db operator #4127

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 4 additions & 55 deletions scripts/setup-operators.sh
Original file line number Diff line number Diff line change
@@ -1,26 +1,6 @@
#!/bin/bash
set -x

CI_OPERATOR_HUB_PROJECT=ci-operator-hub-project

install_mongo_operator() {
# First, enable a cluster-wide mongo operator
oc create -f - <<EOF
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: percona-server-mongodb-operator-certified
namespace: openshift-operators
spec:
channel: stable
installPlanApproval: Automatic
name: percona-server-mongodb-operator-certified
source: certified-operators
sourceNamespace: openshift-marketplace
startingCSV: percona-server-mongodb-operator.v1.4.0
EOF
}

install_etcd_operator(){
# Create subscription
oc create -f - <<EOF
Expand Down Expand Up @@ -56,41 +36,10 @@ install_service_binding_operator(){
EOF
}

# install mongo operator
count=0
while [ "$count" -lt "5" ];
do
if oc get csv -n openshift-operators | grep mongo; then
break
else
install_mongo_operator
count=`expr $count + 1`
sleep 15
fi
done

# install etcd operator
count=0
while [ "$count" -lt "5" ];
do
if oc get csv -n openshift-operators | grep etcd; then
break
else
install_etcd_operator
count=`expr $count + 1`
sleep 15
fi
done

install_etcd_operator

# install service-binding-operator
count=0
while [ "$count" -lt "5" ];
do
if oc get csv -n openshift-operators | grep service-binding-operator; then
break
else
install_service_binding_operator
count=`expr $count + 1`
sleep 15
fi
done

install_service_binding_operator
7 changes: 1 addition & 6 deletions tests/integration/operatorhub/cmd_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var _ = Describe("odo service command tests for OperatorHub", func() {

// wait till oc can see the all operators installed by setup script in the namespace
ocArgs := []string{"get", "csv"}
operators := []string{"etcd"}
operators := []string{"etcd", "Service Binding Operator"}
for _, operator := range operators {
helper.WaitForCmdOut("oc", ocArgs, 1, true, func(output string) bool {
return strings.Contains(output, operator)
Expand All @@ -58,11 +58,6 @@ var _ = Describe("odo service command tests for OperatorHub", func() {
helper.MatchAllInOutput(stdOut, []string{"Operators available in the cluster", "etcdoperator"})
})

It("should list operators installed in the namespace", func() {
stdOut := helper.CmdShouldPass("odo", "catalog", "list", "services")
helper.MatchAllInOutput(stdOut, []string{"Operators available in the cluster", "etcdoperator"})
})

It("should not allow interactive mode command to be executed", func() {
stdOut := helper.CmdShouldFail("odo", "service", "create")
Expect(stdOut).To(ContainSubstring("please use a valid command to start an Operator backed service"))
Expand Down