Skip to content

Commit

Permalink
Move OIDC tests to test/rekt (#7622)
Browse files Browse the repository at this point in the history
* Prepare infra

* Move apiserversource oidc tests

* Move containersource oidc tests

* Move channel oidc tests

* Move pingsource oidc tests

* Move parallel oidc tests

* Move sequence oidc tests

* Move broker oidc tests

* Cleanup infra

* Split parallel tests in 2

* Fix some prerequisites

* Move oidc tests into oidc_feature.go files

* Add boilerplate header

* Run goimports

* Fix more boilerplate headers

* Cleanup features configmap file

* Fix some import aliases
  • Loading branch information
creydr authored Jan 25, 2024
1 parent ab47824 commit bcba98a
Show file tree
Hide file tree
Showing 21 changed files with 315 additions and 365 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/kind-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
- ./test/e2e
- ./test/conformance
- ./test/experimental
- ./test/auth

# Map between K8s and KinD versions.
# This is attempting to make it a bit clearer what's being tested.
Expand Down Expand Up @@ -111,11 +110,6 @@ jobs:
run: |
kubectl apply -f ./test/experimental/config
- name: Apply auth features config
if: matrix.test-suite == './test/auth'
run: |
kubectl apply -f ./test/auth/config
- name: Wait for things to be up
run: |
set -e
Expand Down
46 changes: 0 additions & 46 deletions test/auth/main_test.go

This file was deleted.

225 changes: 0 additions & 225 deletions test/auth/oidc_test.go

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 The Knative Authors
# Copyright 2024 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.
Expand All @@ -20,4 +20,3 @@ metadata:
data:
authentication-oidc: "enabled"
transport-encryption: "strict"

6 changes: 6 additions & 0 deletions test/e2e-rekt-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,10 @@ kubectl apply -Rf "$(dirname "$0")/config-transport-encryption"

go_test_e2e -timeout=1h ./test/rekt -run TLS || fail_test

echo "Running E2E OIDC Reconciler Tests"

kubectl apply -Rf "$(dirname "$0")/config-authentication-oidc"

go_test_e2e -timeout=1h ./test/rekt -run OIDC || fail_test

success
15 changes: 15 additions & 0 deletions test/rekt/apiserversource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,18 @@ func TestApiServerSourceDataPlane_MultipleNamespacesEmptySelector(t *testing.T)

env.Test(ctx, t, apiserversourcefeatures.SendsEventsForAllResourcesWithEmptyNamespaceSelector())
}

func TestApiserversourceSendEventWithJWTOIDC(t *testing.T) {
t.Parallel()

ctx, env := global.Environment(
knative.WithKnativeNamespace(system.Namespace()),
knative.WithLoggingConfig,
knative.WithTracingConfig,
k8s.WithEventListener,
environment.Managed(t),
eventshub.WithTLS(t),
)

env.Test(ctx, t, apiserversourcefeatures.ApiserversourceSendEventWithJWT())
}
Loading

0 comments on commit bcba98a

Please sign in to comment.