-
Notifications
You must be signed in to change notification settings - Fork 43
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
fix(IAM Policy Management): remove options
property from PolicyAssignment
#248
Conversation
Signed-off-by: Alluri-Varma <alluri.varma@ibm.com>
Signed-off-by: Alluri-Varma <alluri.varma@ibm.com>
Signed-off-by: Alluri-Varma <alluri.varma@ibm.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.
Most of the changes look good, but need to improve the code style here and there. Also, don't forget to sign the CLA!
@Test(dependsOnMethods = { "testCreateS2SPolicyTemplate" }) | ||
public void testCreatePolicyAssignmentError() throws Exception { | ||
try{ | ||
AssignmentTargetDetails assignmentTargetDetails = new AssignmentTargetDetails.Builder() | ||
.type("Enterprise") | ||
.id(testTargetEnterpriseAccountId) | ||
.build(); | ||
|
||
AssignmentTemplateDetails assignmentTemplateDetails = new AssignmentTemplateDetails.Builder() | ||
.id(testS2STemplateId) | ||
.version(testS2SBaseTemplateVersion) | ||
.build(); | ||
|
||
|
||
CreatePolicyTemplateAssignmentOptions createPolicyAssignmentOptions = new CreatePolicyTemplateAssignmentOptions.Builder() | ||
.version("1.0") | ||
.target(assignmentTargetDetails) | ||
.templates(new ArrayList<AssignmentTemplateDetails>(Arrays.asList(assignmentTemplateDetails))) | ||
.build(); | ||
Response<PolicyAssignmentV1Collection> response = service.createPolicyTemplateAssignment(createPolicyAssignmentOptions).execute(); | ||
} catch (BadRequestException e) { | ||
assertEquals(e.getStatusCode(), 400); | ||
assertEquals(e.getMessage(), "Invalid body format. Check the input parameters. instance.target.type is not one of enum values: Account"); | ||
} | ||
|
||
} | ||
|
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.
Please format this code block (testCreatePolicyAssignmentError()
) with a formatter, because it contains missing spaces (like in the try{
statement) and wrong indentation (the whole try block) and so on.
PolicyAssignmentV1Options assignmentV1Options = new PolicyAssignmentV1Options.Builder() | ||
.root(rootAssignmentDetails) | ||
.build(); | ||
|
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.
I thinks there should be only a single new line here.
Signed-off-by: Alluri-Varma <alluri.varma@ibm.com>
Signed-off-by: Norbert Biczo <pyrooka@users.noreply.github.com>
Signed-off-by: Norbert Biczo <pyrooka@users.noreply.github.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.
@siddhualluri @siddhuvarma1997 Please attach the result of the example test run and sign the CLA!
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.
Although there is an error in the examples test run I approve this, because overall the build succeeded and I see no reason the examples to fail because the change is pretty straightforward and simple.
(cc @padamstx you might have some thoughts on this.)
options
property from PolicyAssignment
## [0.54.2](0.54.1...0.54.2) (2024-07-05) ### Bug Fixes * **IAM Policy Management:** remove `options` property from PolicyAssignment ([#248](#248)) ([9897bb5](9897bb5))
🎉 This PR is included in version 0.54.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
PR summary
PR Checklist
Please make sure that your PR fulfills the following requirements:
Current vs new behavior
Does this PR introduce a breaking change?
Other information