Skip to content

Conversation

@himani2411
Copy link
Contributor

Description of changes

Add Integration tests for Iam Resource Prefix and config file for Iam Resource Prefix.
Add Custom CLI credentials for Integration tests.

Co-authored-by: Himani Deshpande himanidp@amazon.com

References

Checklist

  • Make sure you are pointing to the right branch and add a label in the PR title (i.e. 2.x vs 3.x)
  • Check all commits' messages are clear, describing what and why vs how.
  • Make sure to have added unit tests or integration tests to cover the new/modified code.
  • Check if documentation is impacted by this change.

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.

* 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>
@himani2411 himani2411 added skip-changelog-update Disables the check that enforces changelog updates in PRs 3.x labels Dec 19, 2022
@himani2411 himani2411 requested review from a team as code owners December 19, 2022 15:37
@himani2411 himani2411 merged commit 7b8a17a into aws:release-3.4 Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.x skip-changelog-update Disables the check that enforces changelog updates in PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants