-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Azure authz uses v1beta1 instead of v1 for SubjectAccessReview (#259)
- Loading branch information
Showing
9 changed files
with
94 additions
and
94 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ import ( | |
"github.com/appscode/pat" | ||
|
||
"github.com/stretchr/testify/assert" | ||
authzv1 "k8s.io/api/authorization/v1" | ||
authzv1beta1 "k8s.io/api/authorization/v1beta1" | ||
) | ||
|
||
const ( | ||
|
@@ -131,10 +131,10 @@ func TestCheck(t *testing.T) { | |
defer srv.Close() | ||
defer store.Close() | ||
|
||
request := &authzv1.SubjectAccessReviewSpec{ | ||
request := &authzv1beta1.SubjectAccessReviewSpec{ | ||
User: "[email protected]", | ||
ResourceAttributes: &authzv1.ResourceAttributes{Namespace: "dev", Group: "", Resource: "pods", | ||
Subresource: "status", Version: "v1", Name: "test", Verb: "delete"}, Extra: map[string]authzv1.ExtraValue{"oid": {"00000000-0000-0000-0000-000000000000"}}} | ||
ResourceAttributes: &authzv1beta1.ResourceAttributes{Namespace: "dev", Group: "", Resource: "pods", | ||
Subresource: "status", Version: "v1", Name: "test", Verb: "delete"}, Extra: map[string]authzv1beta1.ExtraValue{"oid": {"00000000-0000-0000-0000-000000000000"}}} | ||
|
||
resp, err := client.Check(request, store) | ||
assert.Nilf(t, err, "Should not have got error") | ||
|
This file contains 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
Oops, something went wrong.