-
Notifications
You must be signed in to change notification settings - Fork 213
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
feat(build/testing): add authz specific integration tests #3163
Conversation
Signed-off-by: George MacRorie <me@georgemac.com>
Signed-off-by: George MacRorie <me@georgemac.com>
Signed-off-by: George MacRorie <me@georgemac.com>
Signed-off-by: George MacRorie <me@georgemac.com>
…uest Signed-off-by: George MacRorie <me@georgemac.com>
Signed-off-by: George MacRorie <me@georgemac.com>
…nt authz roles Signed-off-by: George MacRorie <me@georgemac.com>
Signed-off-by: George MacRorie <me@georgemac.com>
Signed-off-by: George MacRorie <me@georgemac.com>
Signed-off-by: George MacRorie <me@georgemac.com>
…etadata Signed-off-by: George MacRorie <me@georgemac.com>
Signed-off-by: George MacRorie <me@georgemac.com>
Signed-off-by: George MacRorie <me@georgemac.com>
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.
looks great to me! thank you for doing all this! has already proven it was necessary
}) | ||
|
||
for _, namespace := range integration.Namespaces { | ||
t.Run(fmt.Sprintf("InNamespace(%q)", namespace.Key), func(t *testing.T) { |
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.
t.Run(fmt.Sprintf("InNamespace(%q)", namespace.Key), func(t *testing.T) { | |
t.Run(fmt.Sprintf("InNamespace(%q)", namespace.Expected), func(t *testing.T) { |
Will prevent ""
from showing in output
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.
This is to test both default
and ""
(blank) explicitly.
Otherwise, those two test suites will be duplicately named.
@@ -107,7 +110,7 @@ func (req *UpdateNamespaceRequest) Request() Request { | |||
} | |||
|
|||
func (req *DeleteNamespaceRequest) Request() Request { | |||
return NewRequest(ResourceFlag, ActionDelete, WithNamespace(req.Key)) | |||
return NewRequest(ResourceNamespace, ActionDelete, WithNamespace(req.Key)) |
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.
💯
Resource: r, | ||
Action: a, | ||
Status: StatusSuccess, | ||
Namespace: DefaultNamespace, |
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.
😲
This PRs does a few things, but primarily it adds ITs for Authz.
In addition, there were a couple features I snuck in to make it all possible:
io.flipt.auth
are copied into authentication metadataUpdate:
The addition of more cases demonstrated a couple bugs, which this PR address:
flag delete
perms.Outstanding: