-
Notifications
You must be signed in to change notification settings - Fork 7
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
chore(RHTAPATCH-1069): unit-tests for runAccessCheck #36
Conversation
3264d4a
to
5f99716
Compare
5f99716
to
e4ede16
Compare
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.
lgtm
e4ede16
to
3290ac9
Compare
/retest |
1 similar comment
/retest |
3290ac9
to
7912ce7
Compare
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.
lgtm
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.
lgtm. fix the typos on the descriptions.
cmd/main_test.go
Outdated
Expect(err).NotTo(HaveOccurred(), "Unexpected error testing RunAccessCheck") | ||
}, | ||
Entry( | ||
"A user that has access to the resource should return true (user2 have permission to 'create' on test-tenant-1)", |
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.
"A user that has access to the resource should return true (user2 have permission to 'create' on test-tenant-1)", | |
"A user that has access to the resource should return true (user2 has permission to 'create' on test-tenant-1)", |
cmd/main_test.go
Outdated
"create", | ||
true), | ||
Entry( | ||
"A user that does not have any premissions on the namespace should return false (user1 don't have access to test-tenant-2)", |
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.
"A user that does not have any premissions on the namespace should return false (user1 don't have access to test-tenant-2)", | |
"A user that does not have any premissions on the namespace should return false (user1 doesn't have access to test-tenant-2)", |
cmd/main_test.go
Outdated
"create", | ||
false), | ||
Entry( | ||
"A user that does not have the permissions to perform the specific action on the namespace should return false (user1 don't have permission to 'patch' on test-tenant-1)", |
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.
"A user that does not have the permissions to perform the specific action on the namespace should return false (user1 don't have permission to 'patch' on test-tenant-1)", | |
"A user that does not have the permissions to perform the specific action on the namespace should return false (user1 doesn't have permission to 'patch' on test-tenant-1)", |
Add unit-tests to `runAccessCheck`. We decided to perform the tests using the same test suite we are using for the functional tests, using testenv. It is setting up a real environment for us, and we don't have to deal with ugly fakes when using the k8s authorization. Signed-off-by: Omer Turner <[email protected]>
7912ce7
to
f5ff0fd
Compare
Add unit-tests to
runAccessCheck
.We decided to perform the tests using the same test suite
we are using for the functional tests, using testenv.
It is setting up a real environment for us, and we don't
have to deal with ugly fakes when using the k8s authorization.