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

[BB-248] Improving test coverage #249

Merged
merged 13 commits into from
Apr 10, 2024
Merged

[BB-248] Improving test coverage #249

merged 13 commits into from
Apr 10, 2024

Conversation

Franr
Copy link
Contributor

@Franr Franr commented Feb 24, 2024

What?

Improving tests coverage, mostly around modules/credentials
Separating GHA files into 2: we need the "push" event for the unit tests, for the coverage integration, but not on the integration ones.

Why?

To improve the tools quality/realiability!

References

https://coveralls.io/builds/66184725

fetch_mfa_device (bool): Whether to fetch MFA device for profiles.
"""
short_name, type = profile.split("-")
Copy link
Contributor Author

@Franr Franr Feb 25, 2024

Choose a reason for hiding this comment

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

type is a built-in function, better not to shadow it 🙂

@Franr Franr marked this pull request as ready for review February 25, 2024 19:07
Comment on lines 86 to 90
def test_configure_accounts_profiles(mocked_backup, mfa_device, muted_click_context):
"""
Test that the expected jsons for the aws credentials are generated as expected.
Cover both mfa and no-mfa cases.
"""
Copy link
Contributor

Choose a reason for hiding this comment

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

@Franr I'd split these tests and have a separate test for each case.

@borland667
Copy link
Contributor

@Franr General question. Perhaps I'm not familiar with the code yet but I'm finding it hard to understand what are you trying to test with some of the methods that do not describe what you are trying to test. Can we add docstrings with descriptions to all tests so its clear what is the intent ?

@Franr Franr merged commit 4018cab into master Apr 10, 2024
13 checks passed
@Franr Franr deleted the 248-improve-coverage branch April 10, 2024 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request patch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants