Skip to content
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
5 changes: 5 additions & 0 deletions .github/workflows/kind-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ jobs:
source ./test/e2e-common.sh
test_setup

- name: Apply experimental features config
if: matrix.test-suite == './test/experimental'
run: |
kubectl apply -f ./test/experimental/config

- name: Wait for things to be up
run: |
set -e
Expand Down
24 changes: 24 additions & 0 deletions test/experimental/config/features.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2021 The Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: v1
kind: ConfigMap
metadata:
name: config-features
namespace: knative-eventing
labels:
eventing.knative.dev/release: devel
knative.dev/config-propagation: original
knative.dev/config-category: eventing
data:
23 changes: 0 additions & 23 deletions test/experimental/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,8 @@ import (
"os"
"testing"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
experimental "knative.dev/eventing/pkg/apis/feature"
"knative.dev/pkg/system"

// Uncomment the following line to load the gcp plugin (only required to authenticate against GKE clusters).
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
kubeclient "knative.dev/pkg/client/injection/kube/client"
"knative.dev/pkg/injection"
_ "knative.dev/pkg/system/testing"

Expand Down Expand Up @@ -63,24 +58,6 @@ func TestMain(m *testing.M) {
// is passing and saving the client injection enabled context for use later.
global = environment.NewGlobalEnvironment(ctx)

// -- Setup the experimental features CM --
experimentalFeaturesCm, err := kubeclient.Get(ctx).
CoreV1().
ConfigMaps(system.Namespace()).
Get(ctx, experimental.FlagsConfigName, metav1.GetOptions{})
if err != nil {
panic("Cannot retrieve the experimental features config map")
}

// Enable the experimental features to test
_, err = kubeclient.Get(ctx).
CoreV1().
ConfigMaps(system.Namespace()).
Update(ctx, experimentalFeaturesCm, metav1.UpdateOptions{})
if err != nil {
panic("Cannot update the experimental features config map")
}

// Run the tests.
os.Exit(m.Run())
}