Skip to content

Commit 756f233

Browse files
author
Scott Nichols
committed
I did not realize testing installed knative eventing into another namespace. sed rename like the other installs.
1 parent 48d198b commit 756f233

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

test/e2e-common.sh

+10-4
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ readonly MT_CHANNEL_BASED_BROKER_DEFAULT_CONFIG="config/core/configmaps/default-
4242

4343
# Sugar Controller config. For label/annotation magic.
4444
readonly SUGAR_CONTROLLER_CONFIG_DIR="config/sugar"
45+
readonly SUGAR_CONTROLLER_CONFIG="config/sugar/500-controller.yaml"
4546

4647
# Channel Based Broker Controller.
4748
readonly CHANNEL_BASED_BROKER_CONTROLLER="config/brokers/channel-broker"
@@ -179,11 +180,16 @@ function install_mt_broker() {
179180
ko apply --strict -f ${TMP_MT_CHANNEL_BASED_BROKER_CONFIG_DIR} || return 1
180181
wait_until_pods_running ${TEST_EVENTING_NAMESPACE} || return 1
181182
wait_until_pods_running ${TEST_EVENTING_NAMESPACE} || fail_test "Knative Eventing with MT Broker did not come up"
183+
}
182184

183-
# Install Sugar Controller
184-
ko apply --strict -f ${SUGAR_CONTROLLER_CONFIG_DIR} || return 1
185-
kubectl -n ${KNATIVE_DEFAULT_NAMESPACE} set env deployment/sugar-controller BROKER_INJECTION_DEFAULT=true || return 1
186-
wait_until_pods_running ${KNATIVE_DEFAULT_NAMESPACE} || return 1
185+
function install_sugar() {
186+
local TMP_SUGAR_CONTROLLER_CONFIG_DIR=${TMP_DIR}/${SUGAR_CONTROLLER_CONFIG_DIR}
187+
mkdir -p ${TMP_SUGAR_CONTROLLER_CONFIG_DIR}
188+
cp -r ${SUGAR_CONTROLLER_CONFIG_DIR}/* ${TMP_SUGAR_CONTROLLER_CONFIG_DIR}
189+
find ${TMP_SUGAR_CONTROLLER_CONFIG_DIR} -type f -name "*.yaml" -exec sed -i "s/namespace: ${KNATIVE_DEFAULT_NAMESPACE}/namespace: ${TEST_EVENTING_NAMESPACE}/g" {} +
190+
ko apply --strict -f ${TMP_SUGAR_CONTROLLER_CONFIG_DIR} || return 1
191+
kubectl -n ${TEST_EVENTING_NAMESPACE} set env deployment/sugar-controller BROKER_INJECTION_DEFAULT=true || return 1
192+
wait_until_pods_running ${TEST_EVENTING_NAMESPACE} || fail_test "Knative Eventing Sugar Controller did not come up"
187193
}
188194

189195
# Teardown the Knative environment after tests finish.

test/e2e-tests.sh

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ initialize $@ --skip-istio-addon
3434

3535
install_mt_broker || fail_test "Could not install MT Channel Based Broker"
3636

37+
install_sugar || fail_test "Could not install Sugar Controller"
38+
3739
echo "Running tests with Multi Tenant Channel Based Broker"
3840
go_test_e2e -timeout=30m -parallel=12 ./test/e2e ./test/conformance -brokerclass=MTChannelBasedBroker -channels=messaging.knative.dev/v1beta1:Channel,messaging.knative.dev/v1beta1:InMemoryChannel,messaging.knative.dev/v1:Channel,messaging.knative.dev/v1:InMemoryChannel -sources=sources.knative.dev/v1alpha2:ApiServerSource,sources.knative.dev/v1alpha2:ContainerSource,sources.knative.dev/v1alpha2:PingSource || fail_test
3941

test/e2e-upgrade-tests.sh

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ run_preinstall_V016 || fail_test 'Running preinstall 0.16 failed'
6262
install_head || fail_test 'Installing HEAD version of eventing failed'
6363
install_channel_crds || fail_test 'Installing HEAD channel CRDs failed'
6464
install_mt_broker || fail_test 'Installing HEAD Broker failed'
65+
install_sugar || fail_test 'Installing HEAD Sugar failed'
6566

6667
header "Running postupgrade tests"
6768
go_test_e2e -tags=postupgrade -timeout="${TIMEOUT}" ./test/upgrade || fail_test

0 commit comments

Comments
 (0)