Skip to content

Add legacy rbac endpoint integration tests - #19749

Merged
openshift-merge-robot merged 1 commit into
openshift:masterfrom
mrogers950:rbac-tests
May 17, 2018
Merged

openshift-merge-robot merged 1 commit into
openshift:masterfrom
mrogers950:rbac-tests

Conversation

@mrogers950

@mrogers950 mrogers950 commented May 17, 2018 •

Copy link
Copy Markdown

Fixes #15830

@openshift/sig-security

@openshift-ci-robot openshift-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label May 17, 2018

@enj enj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments.

Comment thread test/integration/authorization_test.go Outdated
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: drop the "types" name

}

// list rolebindings
roleBindingList := &authorizationapi.RoleBindingList{}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably want to make sure list options and get options work?

Comment thread test/integration/authorization_test.go Outdated
err = clusterAdmin.Authorization().RESTClient().Get().AbsPath(rolesPath).Name(testRole).Do().Into(getRole)
if err == nil {
t.Errorf("expected error")
} else if err.Error() != fmt.Sprintf("roles \"%s\" not found", testRole) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could be able to use the error helpers such as IsNotFound.

@enj

enj commented May 17, 2018

Copy link
Copy Markdown
Contributor

/approve

Deferring LGTM to @simo5

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 17, 2018
@simo5

simo5 commented May 17, 2018

Copy link
Copy Markdown

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 17, 2018
@openshift-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: enj, mrogers950, simo5

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot
openshift-merge-robot merged commit 3ddd571 into openshift:master May 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. sig/security size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants