-
Notifications
You must be signed in to change notification settings - Fork 4.7k
allow review endpoints on missing namespaces #11321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,21 @@ source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh" | |
trap os::test::junit::reconcile_output EXIT | ||
|
||
os::test::junit::declare_suite_start "cmd/projects" | ||
|
||
os::test::junit::declare_suite_start "cmd/projects/lifecycle" | ||
# resourceaccessreview | ||
os::cmd::expect_success 'oc policy who-can get pods -n missing-ns' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a weak test |
||
# selfsubjectaccessreview | ||
os::cmd::expect_success 'oc policy can-i get pods -n missing-ns' | ||
# selfsubjectrulesreivew | ||
os::cmd::expect_success 'oc policy can-i --list -n missing-ns' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a weak test |
||
# subjectaccessreview | ||
os::cmd::expect_success 'oc policy can-i get pods --user=bob -n missing-ns' | ||
# subjectrulesreview | ||
os::cmd::expect_success 'oc policy can-i --list --user=bob -n missing-ns' | ||
echo 'project lifecycle ok' | ||
os::test::junit::declare_suite_end | ||
|
||
os::cmd::expect_failure_and_text 'oc projects test_arg' 'no arguments' | ||
# log in as a test user and expect no projects | ||
os::cmd::expect_success 'oc login -u test -p test' | ||
|
@@ -21,4 +36,6 @@ os::cmd::try_until_text 'oc projects' 'test6' | |
os::cmd::expect_success_and_text 'oc project test6' 'Now using project "test6"' | ||
os::cmd::expect_success_and_text 'oc config view -o jsonpath="{.contexts[*].context.namespace}"' '\btest6\b' | ||
echo 'projects command ok' | ||
|
||
|
||
os::test::junit::declare_suite_end |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
subjectrulesreviews
isn't in the upstream set ofaccessReviewResources
, need a carry commit to add it there