From 0a6d9f4cced5f65aa1de61dd57fcdb9dd24af537 Mon Sep 17 00:00:00 2001 From: Ben Browning Date: Fri, 11 Jan 2019 16:00:57 -0500 Subject: [PATCH 1/2] Point tests to the latest nightly eventing-sources Fixes #718 --- test/e2e-tests.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/test/e2e-tests.sh b/test/e2e-tests.sh index a0087ee23da..080b01bb6be 100755 --- a/test/e2e-tests.sh +++ b/test/e2e-tests.sh @@ -27,11 +27,7 @@ source $(dirname $0)/../vendor/github.com/knative/test-infra/scripts/e2e-tests.sh -# Using the most recent good release of eventing-sources to unblock tests. This -# should be replaced with the commented line below when eventing-sources nightly -# is known good again. -readonly KNATIVE_EVENTING_SOURCES_RELEASE=https://knative-nightly.storage.googleapis.com/eventing-sources/previous/v20181205-fbac942/release.yaml -#readonly KNATIVE_EVENTING_SOURCES_RELEASE=https://knative-nightly.storage.googleapis.com/eventing-sources/latest/release.yaml +readonly KNATIVE_EVENTING_SOURCES_RELEASE=https://knative-nightly.storage.googleapis.com/eventing-sources/latest/release.yaml # Names of the Resources used in the tests. readonly E2E_TEST_NAMESPACE=e2etest From a29e9d221dc72fc158f5bd88ff36a50d3a617bb9 Mon Sep 17 00:00:00 2001 From: Ben Browning Date: Sat, 12 Jan 2019 08:37:35 -0500 Subject: [PATCH 2/2] Fix test namespaces to match passing test in eventing-sources We had an odd mix of defaultNamespaceName and pkgTest.Flags.Namespace in the e2e tests. The defaultNamespaceName is meant to supply the default value for pkgTest.Flags.Namespace, but we should have been referencing pkgTest.Flags.Namespace everywhere as it may not be the same as the default value when running in CI. --- test/e2e/e2e.go | 4 ++-- test/e2e/k8s_events_test.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/e2e/e2e.go b/test/e2e/e2e.go index 62ba6f81ef3..a0bb80c6675 100644 --- a/test/e2e/e2e.go +++ b/test/e2e/e2e.go @@ -157,7 +157,7 @@ func CreateServiceAccountAndBinding(clients *test.Clients, name string, logger * sa := &corev1.ServiceAccount{ ObjectMeta: metav1.ObjectMeta{ Name: name, - Namespace: defaultNamespaceName, + Namespace: pkgTest.Flags.Namespace, }, } err := CreateServiceAccount(clients, sa, logger, cleaner) @@ -172,7 +172,7 @@ func CreateServiceAccountAndBinding(clients *test.Clients, name string, logger * { Kind: "ServiceAccount", Name: name, - Namespace: defaultNamespaceName, + Namespace: pkgTest.Flags.Namespace, }, }, RoleRef: rbacv1.RoleRef{ diff --git a/test/e2e/k8s_events_test.go b/test/e2e/k8s_events_test.go index f321f3071f4..0993356fa93 100644 --- a/test/e2e/k8s_events_test.go +++ b/test/e2e/k8s_events_test.go @@ -52,14 +52,14 @@ func TestKubernetesEvents(t *testing.T) { } logger.Infof("Creating Channel") - channel := test.Channel(channelName, defaultNamespaceName, test.ClusterChannelProvisioner(provisionerName)) + channel := test.Channel(channelName, pkgTest.Flags.Namespace, test.ClusterChannelProvisioner(provisionerName)) err = CreateChannel(clients, channel, logger, cleaner) if err != nil { t.Fatalf("Failed to create Channel: %v", err) } logger.Infof("Creating EventSource") - k8sSource := test.KubernetesEventSource(eventSource, defaultNamespaceName, testNamespace, serviceAccount, test.ChannelRef(channelName)) + k8sSource := test.KubernetesEventSource(eventSource, pkgTest.Flags.Namespace, testNamespace, serviceAccount, test.ChannelRef(channelName)) err = CreateKubernetesEventSource(clients, k8sSource, logger, cleaner) if err != nil { t.Fatalf("Failed to create KubernetesEventSource: %v", err) @@ -74,7 +74,7 @@ func TestKubernetesEvents(t *testing.T) { } logger.Infof("Creating Subscription") - subscription := test.Subscription(subscriptionName, defaultNamespaceName, test.ChannelRef(channelName), test.SubscriberSpecForRoute(routeName), nil) + subscription := test.Subscription(subscriptionName, pkgTest.Flags.Namespace, test.ChannelRef(channelName), test.SubscriberSpecForRoute(routeName), nil) err = CreateSubscription(clients, subscription, logger, cleaner) if err != nil { t.Fatalf("Failed to create Subscription: %v", err)