Skip to content
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

add list rule with service_group_id test #208

Merged
merged 6 commits into from
Oct 14, 2022

Conversation

cam-d12
Copy link
Contributor

@cam-d12 cam-d12 commented Oct 3, 2022

PR summary

This PR adds CBR support for the new service_group_id parameter in rules.

PR Checklist

Please make sure that your PR fulfills the following requirements:

  • The commit message follows the Angular Commit Message Guidelines.
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Current vs new behavior

No current behavior should be modified. Adds the further control to be able to apply rules to service groups

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@CLAassistant
Copy link

CLAassistant commented Oct 3, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@soohoowoohoo soohoowoohoo left a comment

Choose a reason for hiding this comment

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

Looks good.

Copy link
Member

@soohoowoohoo soohoowoohoo left a comment

Choose a reason for hiding this comment

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

A few comments.

Expect(rule).ToNot(BeNil())

//list rule with service_group_id
It(`ListRules(listRulesOptions *ListRulesOptions) with service_group_id (201)`, func() {
Copy link
Member

Choose a reason for hiding this comment

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

Listing rules should result in a 200


Expect(err).To(Not(BeNil()))
Expect(response.StatusCode).To(Equal(201))
Expect(ruleList).To(BeNil())
Copy link
Member

Choose a reason for hiding this comment

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

I would expect the tests to assert that 1 rule was returned in the list and that it has the rule ID of the rule created above.

ruleList, response, err := contextBasedRestrictionsService.ListRules(listRulesOptions)

Expect(err).To(Not(BeNil()))
Expect(response.StatusCode).To(Equal(201))
Copy link
Member

Choose a reason for hiding this comment

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

Should be a 200

@cam-d12 cam-d12 marked this pull request as ready for review October 12, 2022 21:21
Copy link
Member

@soohoowoohoo soohoowoohoo left a comment

Choose a reason for hiding this comment

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

LGTM

@padamstx padamstx self-assigned this Oct 13, 2022
Copy link
Member

@padamstx padamstx left a comment

Choose a reason for hiding this comment

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

LGTM

@padamstx padamstx merged commit e3b7581 into IBM:main Oct 14, 2022
ibm-devx-sdk pushed a commit that referenced this pull request Oct 14, 2022
## [0.28.6](v0.28.5...v0.28.6) (2022-10-14)

### Bug Fixes

* **Context Based Restrictions:** add list rule with service_group_id test ([#208](#208)) ([e3b7581](e3b7581))
@ibm-devx-sdk
Copy link

🎉 This PR is included in version 0.28.6 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants