Skip to content

Commit

Permalink
Merge pull request #15940 from mrogers950/router-test-del
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue (batch tested with PRs 15942, 15940, 15957, 15858, 15946)

Add a router cmd test to exercise ignoreError() locally

This had test coverage only seemingly as a side-effect of the github CI environment. The added test works for running `hack/test-cmd.sh router` locally
  • Loading branch information
openshift-merge-robot authored Aug 26, 2017
2 parents 98dfaa3 + 1fb6ab2 commit 0518674
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/cmd/router.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ os::cmd::expect_success "oc adm router --images='${USE_IMAGES}'"
os::cmd::expect_success_and_text 'oc adm router' 'service exists'
os::cmd::expect_success_and_text 'oc get dc/router -o yaml' 'readinessProbe'

# delete the router and deployment config, leaving the clusterrolebinding and service account
os::cmd::expect_success_and_text "oc delete svc/router" 'service "router" deleted'
os::cmd::expect_success_and_text "oc delete dc/router" 'deploymentconfig "router" deleted'
# create a router and check for success with a warning about the existing clusterrolebinding
os::cmd::expect_success_and_text "oc adm router" 'warning: clusterrolebindings "router-router-role" already exists'

# only when using hostnetwork should we force the probes to use localhost
os::cmd::expect_success_and_not_text "oc adm router -o yaml --host-network=false" 'host: localhost'
os::cmd::expect_success "oc adm router -o yaml | oc delete -f -"
Expand Down

0 comments on commit 0518674

Please sign in to comment.