-
Notifications
You must be signed in to change notification settings - Fork 314
[3.x] Add Integration tests for Resource Prefix #4652
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
Merged
Merged
Conversation
This file contains hidden or 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
Codecov Report
@@ Coverage Diff @@
## develop #4652 +/- ##
========================================
Coverage 89.05% 89.05%
========================================
Files 163 163
Lines 14361 14361
========================================
Hits 12789 12789
Misses 1572 1572 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
407a2a4 to
c6119ec
Compare
gmarciani
reviewed
Dec 6, 2022
tests/integration-tests/tests/iam/test_iam/test_iam_resource_prefix/pcluster.config.yaml
Show resolved
Hide resolved
tests/integration-tests/tests/iam/test_iam/test_iam_resource_prefix/pcluster.config.yaml
Outdated
Show resolved
Hide resolved
himani2411
pushed a commit
to himani2411/aws-parallelcluster
that referenced
this pull request
Dec 14, 2022
Update the pcluster.config.yaml file to remove Iam section and use _inject_resource_in_config() to inject Iam and ResourcePrefix Section Change scope of initialize and register_prefix_cli_credentials from class to default(function) level Update _test_iam_resource_in_cluster() to add Cluster creation verification Update test_iam_resource_prefix to remove duplication of user-role-rp for each value of iam_resource_prefix_list test and improve performance. Change position of user-role-iam-resource-prefix.cfn.yaml to the tests folder directory Remove update_config variable from test_iam_resource_prefix PR Link: aws#4652
2f7b5e3 to
ef876e8
Compare
himani2411
pushed a commit
to himani2411/aws-parallelcluster
that referenced
this pull request
Dec 14, 2022
Update the pcluster.config.yaml file to remove Iam section and use _inject_resource_in_config() to inject Iam and ResourcePrefix Section Change scope of initialize and register_prefix_cli_credentials from class to default(function) level Update _test_iam_resource_in_cluster() to add Cluster creation verification Update test_iam_resource_prefix to remove duplication of user-role-rp for each value of iam_resource_prefix_list test and improve performance. Change position of user-role-iam-resource-prefix.cfn.yaml to the tests folder directory Remove update_config variable from test_iam_resource_prefix PR Link: aws#4652
ef876e8 to
73b2d9b
Compare
himani2411
pushed a commit
to himani2411/aws-parallelcluster
that referenced
this pull request
Dec 15, 2022
Update the pcluster.config.yaml file to remove Iam section and use _inject_resource_in_config() to inject Iam and ResourcePrefix Section Change scope of initialize and register_prefix_cli_credentials from class to default(function) level Update _test_iam_resource_in_cluster() to add Cluster creation verification Update test_iam_resource_prefix to remove duplication of user-role-rp for each value of iam_resource_prefix_list test and improve performance. Change position of user-role-iam-resource-prefix.cfn.yaml to the tests folder directory Remove update_config variable from test_iam_resource_prefix PR Link: aws#4652
3619782 to
a04ec63
Compare
himani2411
pushed a commit
to himani2411/aws-parallelcluster
that referenced
this pull request
Dec 15, 2022
Update the pcluster.config.yaml file to remove Iam section and use _inject_resource_in_config() to inject Iam and ResourcePrefix Section Change scope of initialize and register_prefix_cli_credentials from class to default(function) level Update _test_iam_resource_in_cluster() to add Cluster creation verification Update test_iam_resource_prefix to remove duplication of user-role-rp for each value of iam_resource_prefix_list test and improve performance. Change position of user-role-iam-resource-prefix.cfn.yaml to the tests folder directory Remove update_config variable from test_iam_resource_prefix PR Link: aws#4652
himani2411
pushed a commit
to himani2411/aws-parallelcluster
that referenced
this pull request
Dec 15, 2022
Remove _inject_resource_in_config() which is unused for this PR( part of another PR) Revert run_command() to its original definition Update run_pcluster_command() to handle switching and KeyError for credential_arn Remove unnecessary key word arguments passed from create_cluster() to run_pcluster_command() Reference PR: aws#4652
a04ec63 to
dfcb0ee
Compare
himani2411
pushed a commit
to himani2411/aws-parallelcluster
that referenced
this pull request
Dec 15, 2022
Removing custom_cli_credentials from Cluster Factory class member. Reference PR: aws#4652
Add Integration test cases and config file for Iam Resource Prefix in test_iam.py Add user-role-rp.cfn.yaml to provide a User Role for creating test clusters Add the test case in pcluster3.yaml config for Jenkins tests.
Update the pcluster.config.yaml file to remove Iam section and use _inject_resource_in_config() to inject Iam and ResourcePrefix Section Change scope of initialize and register_prefix_cli_credentials from class to default(function) level Update _test_iam_resource_in_cluster() to add Cluster creation verification Update test_iam_resource_prefix to remove duplication of user-role-rp for each value of iam_resource_prefix_list test and improve performance. Change position of user-role-iam-resource-prefix.cfn.yaml to the tests folder directory Remove update_config variable from test_iam_resource_prefix PR Link: aws#4652
Add Iam/ResourcePrefix in pcluster.config.yaml Change user-role-iam-resource-prefix.cfn.yaml to handle /path-prefix/name-prefix- Iam Resource Prefix Add /path-prefix/name-prefix as the only pytest parameter and remove use_default_iam_credentials parameter check condition from initialize_resource_prefix_cli_creds
Add test specific CLI credentials while creation of cluster and run pcluster commands. Change ClusterFactory's create_cluster() to have test specific CLI credentials as arguments Change user-role-iam-resource-prefix.cfn.yaml to handle /path-prefix/name-prefix- Iam Resource Prefix Remove register_resource_prefix_cli_credentials as it will affect parallel tests running in same region.
Remove _inject_resource_in_config() which is unused for this PR( part of another PR) Revert run_command() to its original definition Update run_pcluster_command() to handle switching and KeyError for credential_arn Remove unnecessary key word arguments passed from create_cluster() to run_pcluster_command() Reference PR: aws#4652
Removing custom_cli_credentials from Cluster Factory class member. Reference PR: aws#4652
Revert the changes in indentation and scope of if clause in run_pcluster_command() Reference PR: aws#4652
fc1fc0d to
9457ef2
Compare
dreambeyondorange
approved these changes
Dec 16, 2022
4 tasks
himani2411
added a commit
to himani2411/aws-parallelcluster
that referenced
this pull request
Dec 19, 2022
* Add Integration tests for Resource Prefix Add Integration test cases and config file for Iam Resource Prefix in test_iam.py Add user-role-rp.cfn.yaml to provide a User Role for creating test clusters Add the test case in pcluster3.yaml config for Jenkins tests. * Remove File deleteS3.py * Change according to PR Update the pcluster.config.yaml file to remove Iam section and use _inject_resource_in_config() to inject Iam and ResourcePrefix Section Change scope of initialize and register_prefix_cli_credentials from class to default(function) level Update _test_iam_resource_in_cluster() to add Cluster creation verification Update test_iam_resource_prefix to remove duplication of user-role-rp for each value of iam_resource_prefix_list test and improve performance. Change position of user-role-iam-resource-prefix.cfn.yaml to the tests folder directory Remove update_config variable from test_iam_resource_prefix PR Link: aws#4652 * Change Iam Resource Prefix tests to handle one test case Add Iam/ResourcePrefix in pcluster.config.yaml Change user-role-iam-resource-prefix.cfn.yaml to handle /path-prefix/name-prefix- Iam Resource Prefix Add /path-prefix/name-prefix as the only pytest parameter and remove use_default_iam_credentials parameter check condition from initialize_resource_prefix_cli_creds * Add Test specific CLI credentials in cluster creation Add test specific CLI credentials while creation of cluster and run pcluster commands. Change ClusterFactory's create_cluster() to have test specific CLI credentials as arguments Change user-role-iam-resource-prefix.cfn.yaml to handle /path-prefix/name-prefix- Iam Resource Prefix Remove register_resource_prefix_cli_credentials as it will affect parallel tests running in same region. * Remove unnecessary methods and keyword Arguments Remove _inject_resource_in_config() which is unused for this PR( part of another PR) Revert run_command() to its original definition Update run_pcluster_command() to handle switching and KeyError for credential_arn Remove unnecessary key word arguments passed from create_cluster() to run_pcluster_command() Reference PR: aws#4652 * Remove custom_cli_credentials from ClusterFactory Removing custom_cli_credentials from Cluster Factory class member. Reference PR: aws#4652 * Revert change in run_pcluster_command Revert the changes in indentation and scope of if clause in run_pcluster_command() Reference PR: aws#4652 Co-authored-by: Himani Deshpande <himanidp@amazon.com>
4 tasks
himani2411
added a commit
that referenced
this pull request
Dec 19, 2022
* Add Integration tests for Resource Prefix Add Integration test cases and config file for Iam Resource Prefix in test_iam.py Add user-role-rp.cfn.yaml to provide a User Role for creating test clusters Add the test case in pcluster3.yaml config for Jenkins tests. * Remove File deleteS3.py * Change according to PR Update the pcluster.config.yaml file to remove Iam section and use _inject_resource_in_config() to inject Iam and ResourcePrefix Section Change scope of initialize and register_prefix_cli_credentials from class to default(function) level Update _test_iam_resource_in_cluster() to add Cluster creation verification Update test_iam_resource_prefix to remove duplication of user-role-rp for each value of iam_resource_prefix_list test and improve performance. Change position of user-role-iam-resource-prefix.cfn.yaml to the tests folder directory Remove update_config variable from test_iam_resource_prefix PR Link: #4652 * Change Iam Resource Prefix tests to handle one test case Add Iam/ResourcePrefix in pcluster.config.yaml Change user-role-iam-resource-prefix.cfn.yaml to handle /path-prefix/name-prefix- Iam Resource Prefix Add /path-prefix/name-prefix as the only pytest parameter and remove use_default_iam_credentials parameter check condition from initialize_resource_prefix_cli_creds * Add Test specific CLI credentials in cluster creation Add test specific CLI credentials while creation of cluster and run pcluster commands. Change ClusterFactory's create_cluster() to have test specific CLI credentials as arguments Change user-role-iam-resource-prefix.cfn.yaml to handle /path-prefix/name-prefix- Iam Resource Prefix Remove register_resource_prefix_cli_credentials as it will affect parallel tests running in same region. * Remove unnecessary methods and keyword Arguments Remove _inject_resource_in_config() which is unused for this PR( part of another PR) Revert run_command() to its original definition Update run_pcluster_command() to handle switching and KeyError for credential_arn Remove unnecessary key word arguments passed from create_cluster() to run_pcluster_command() Reference PR: #4652 * Remove custom_cli_credentials from ClusterFactory Removing custom_cli_credentials from Cluster Factory class member. Reference PR: #4652 * Revert change in run_pcluster_command Revert the changes in indentation and scope of if clause in run_pcluster_command() Reference PR: #4652 Co-authored-by: Himani Deshpande <himanidp@amazon.com> Co-authored-by: Himani Deshpande <himanidp@amazon.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes
Adding Integration Tests Cases for addition of Resource Prefix, where I am creating a different user role with a permission boundary which restricts a user from creating IAM resources without a specific path or name prefix.
Tests
Checklist
Please review the guidelines for contributing and Pull Request Instructions.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.