Run conformance tests as project admin#5596
Merged
knative-prow-robot merged 12 commits intoAug 2, 2021
Merged
Conversation
* most tests will use just the serviceAccount that has the same name as
the test namespace
* tests using ApiServerSource will user serviceAccount that is named as
follows: ${namespace}-eventwatcher
Codecov Report
@@ Coverage Diff @@
## main #5596 +/- ##
=======================================
Coverage 82.79% 82.79%
=======================================
Files 199 199
Lines 6230 6230
=======================================
Hits 5158 5158
Misses 744 744
Partials 328 328 Continue to review full report at Codecov.
|
aa64eed to
98ccb69
Compare
* since the name of the resources is aligned with the name of the namespace it makes sense to create them only once, at the same time as the namespace
Contributor
|
@aliok can you TAL at this PR? |
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: matzew, mgencur The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
mgencur
added a commit
to mgencur/eventing
that referenced
this pull request
Aug 3, 2021
* Create RBAC according to the test namespace
* most tests will use just the serviceAccount that has the same name as
the test namespace
* tests using ApiServerSource will user serviceAccount that is named as
follows: ${namespace}-eventwatcher
* Script for creating necessary RBAC for conformance tests
* Readme for running Conformance tests as project admin
* Fix imports
* Minor update for readme
* Fix goimport
* Do not fail if ServiceAccount already exists
* Fix goftm
* Mark tests requiring cluster-admin with specific build tag
* Move the creation of SA,Role,RoleBinding close to namespace creation
* since the name of the resources is aligned with the name of the
namespace it makes sense to create them only once, at the same time as
the namespace
* Formatting
* Move remaining creation of SA,Role,RoleBinding
mgencur
added a commit
to mgencur/eventing
that referenced
this pull request
Aug 3, 2021
* Create RBAC according to the test namespace
* most tests will use just the serviceAccount that has the same name as
the test namespace
* tests using ApiServerSource will user serviceAccount that is named as
follows: ${namespace}-eventwatcher
* Script for creating necessary RBAC for conformance tests
* Readme for running Conformance tests as project admin
* Fix imports
* Minor update for readme
* Fix goimport
* Do not fail if ServiceAccount already exists
* Fix goftm
* Mark tests requiring cluster-admin with specific build tag
* Move the creation of SA,Role,RoleBinding close to namespace creation
* since the name of the resources is aligned with the name of the
namespace it makes sense to create them only once, at the same time as
the namespace
* Formatting
* Move remaining creation of SA,Role,RoleBinding
openshift-ci Bot
pushed a commit
to openshift/knative-eventing
that referenced
this pull request
Aug 4, 2021
* Create RBAC according to the test namespace
* most tests will use just the serviceAccount that has the same name as
the test namespace
* tests using ApiServerSource will user serviceAccount that is named as
follows: ${namespace}-eventwatcher
* Script for creating necessary RBAC for conformance tests
* Readme for running Conformance tests as project admin
* Fix imports
* Minor update for readme
* Fix goimport
* Do not fail if ServiceAccount already exists
* Fix goftm
* Mark tests requiring cluster-admin with specific build tag
* Move the creation of SA,Role,RoleBinding close to namespace creation
* since the name of the resources is aligned with the name of the
namespace it makes sense to create them only once, at the same time as
the namespace
* Formatting
* Move remaining creation of SA,Role,RoleBinding
openshift-ci Bot
pushed a commit
to openshift/knative-eventing
that referenced
this pull request
Aug 5, 2021
* Use test namespaces with numeric suffix (knative#5337) * Use test namespaces from pre-defined range * ReuseNamespace flag * ReuseNamespace variable in lib package * prevents import cycle when flags are accessed directly from the lib package * Fix gofmt * Fix goimports * Remove the last occurrence of import cycle * Remove unused variable * Fix detection of NotFound api error * also make the retry count and interval shorter to speed up things * Delete NS only if we created it * leave previously existing namespaces there * Call CreateNamespaceWithRetry directly * Run conformance tests as project admin (knative#5596) * Create RBAC according to the test namespace * most tests will use just the serviceAccount that has the same name as the test namespace * tests using ApiServerSource will user serviceAccount that is named as follows: ${namespace}-eventwatcher * Script for creating necessary RBAC for conformance tests * Readme for running Conformance tests as project admin * Fix imports * Minor update for readme * Fix goimport * Do not fail if ServiceAccount already exists * Fix goftm * Mark tests requiring cluster-admin with specific build tag * Move the creation of SA,Role,RoleBinding close to namespace creation * since the name of the resources is aligned with the name of the namespace it makes sense to create them only once, at the same time as the namespace * Formatting * Move remaining creation of SA,Role,RoleBinding
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This partially fixes #5357 but the user is able to run only conformance tests so far.
With the current changes, and by following the readme below, there are 48 tests passing in the conformance test suite.
Proposed Changes
!project_adminbuild tag to tests that require cluster-admin permissions (this is mostly because they manipulate CRDs or read configs from knative-eventing namespace and try to do port-forwarding to a pod in Knative Eventing namespace (Tracing))Just for reference, we already have similar instructions in Knative Serving and Knative Client:
This PR doesn't include:
Pre-review Checklist
Release Note
Docs