diff --git a/openshift/e2e-common.sh b/openshift/e2e-common.sh index ac33f8cca25..4c4a0ec5b96 100644 --- a/openshift/e2e-common.sh +++ b/openshift/e2e-common.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -export EVENTING_NAMESPACE=knative-eventing +export EVENTING_NAMESPACE="${EVENTING_NAMESPACE:-knative-eventing}" export SYSTEM_NAMESPACE=$EVENTING_NAMESPACE -export OLM_NAMESPACE=openshift-marketplace +export ZIPKIN_NAMESPACE=$EVENTING_NAMESPACE export KNATIVE_DEFAULT_NAMESPACE=$EVENTING_NAMESPACE export CONFIG_TRACING_CONFIG="test/config/config-tracing.yaml" @@ -114,7 +114,111 @@ function run_e2e_tests(){ oc -n knative-eventing set env deployment/mt-broker-controller BROKER_INJECTION_DEFAULT=true || return 1 wait_until_pods_running $EVENTING_NAMESPACE || return 2 - go_test_e2e -timeout=90m -parallel=12 ./test/e2e ./test/conformance \ + go_test_e2e -timeout=90m -parallel=12 ./test/e2e \ + "$run_command" \ + -brokerclass=MTChannelBasedBroker \ + $common_opts || failed=$? + + return $failed +} + +function install_tracing { + deploy_zipkin + enable_eventing_tracing +} + +function deploy_zipkin { + logger.info "Installing Zipkin in namespace ${ZIPKIN_NAMESPACE}" + cat </dev/null || SYSTEM_NAMESPACE="knative-eventing" + sed "s/namespace: ${KNATIVE_DEFAULT_NAMESPACE}/namespace: ${SYSTEM_NAMESPACE}/g" ${CONFIG_TRACING_CONFIG} | oc replace -f - + local test_name="${1:-}" + local run_command="" + local failed=0 + local channels=messaging.knative.dev/v1beta1:Channel,messaging.knative.dev/v1beta1:InMemoryChannel,messaging.knative.dev/v1:Channel,messaging.knative.dev/v1:InMemoryChannel + local sources=sources.knative.dev/v1alpha2:ApiServerSource,sources.knative.dev/v1alpha2:ContainerSource,sources.knative.dev/v1alpha2:PingSource + + local common_opts=" -channels=$channels -sources=$sources --kubeconfig $KUBECONFIG --imagetemplate $TEST_IMAGE_TEMPLATE" + if [ -n "$test_name" ]; then + local run_command="-run ^(${test_name})$" + fi + + oc -n knative-eventing set env deployment/mt-broker-controller BROKER_INJECTION_DEFAULT=true || return 1 + wait_until_pods_running $EVENTING_NAMESPACE || return 2 + + go_test_e2e -timeout=90m -parallel=12 ./test/conformance \ "$run_command" \ -brokerclass=MTChannelBasedBroker \ $common_opts || failed=$? diff --git a/openshift/e2e-tests.sh b/openshift/e2e-tests.sh index 802417a1caf..8a9da1068e4 100644 --- a/openshift/e2e-tests.sh +++ b/openshift/e2e-tests.sh @@ -18,8 +18,12 @@ failed=0 (( !failed )) && install_knative_eventing || failed=1 +(( !failed )) && install_tracing || failed=1 + (( !failed )) && run_e2e_tests || failed=1 +(( !failed )) && run_conformance_tests || failed=1 + (( failed )) && dump_cluster_state (( failed )) && exit 1 diff --git a/openshift/patches/012-skip-tracing-conformance.patch b/openshift/patches/012-skip-tracing-conformance.patch deleted file mode 100644 index b3f7769839f..00000000000 --- a/openshift/patches/012-skip-tracing-conformance.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/test/conformance/broker_tracing_test.go b/test/conformance/broker_tracing_test.go -index 4c292d018..ae1158c02 100644 ---- a/test/conformance/broker_tracing_test.go -+++ b/test/conformance/broker_tracing_test.go -@@ -27,5 +27,6 @@ import ( - ) - - func TestBrokerTracing(t *testing.T) { -+ t.Skip("We for now ignore tracing tests") - helpers.BrokerTracingTestHelperWithChannelTestRunner(context.Background(), t, brokerClass, channelTestRunner, testlib.SetupClientOptionNoop) - } -diff --git a/test/conformance/channel_tracing_test.go b/test/conformance/channel_tracing_test.go -index f9f40ddf6..6de4b576f 100644 ---- a/test/conformance/channel_tracing_test.go -+++ b/test/conformance/channel_tracing_test.go -@@ -27,5 +27,6 @@ import ( - ) - - func TestChannelTracingWithReply(t *testing.T) { -+ t.Skip("We for now ignore tracing tests") - helpers.ChannelTracingTestHelperWithChannelTestRunner(context.Background(), t, channelTestRunner, testlib.SetupClientOptionNoop) - }