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

tests - gracefully handle non-default aws/git config #7057

Merged

Conversation

ajkerrigan
Copy link
Member

@ajkerrigan ajkerrigan commented Jan 12, 2022

This addresses a couple minor test breakages I saw locally due to custom config options for the AWS CLI and git. The changes should be transparent for CI/release but help avoid brittleness for other contributors. Alternative suggestions welcome though!

  • make test-poetry sources test.env before running tests. Unset
    an AWS_PROFILE environment variable if it exists.

  • c7n-policystream tests initialize a local git repo and make
    assumptions about the local git client's init.defaultBranch setting.
    Explicitly use main during initialization and testing.

* `make test-poetry` processes `test.env` before running tests. Unset
an `AWS_PROFILE` environment variable if it exists.

* c7n-policystream tests initialize a local git repo and make
assumptions about the local git client's `init.defaultBranch` setting.
Explicitly use `main` during initialization and testing.
Copy link
Collaborator

@kapilt kapilt left a comment

Choose a reason for hiding this comment

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

lgtm, thanks

@kapilt kapilt merged commit 1ce1deb into cloud-custodian:master Jan 14, 2022
@ajkerrigan ajkerrigan deleted the fix/tests/aws-git-local-settings branch January 14, 2022 14:31
@kapilt
Copy link
Collaborator

kapilt commented Jan 16, 2022

this seemed to cause some breakage on trunk for policy stream testing.

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

Successfully merging this pull request may close these issues.

2 participants