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

fix: [AAP-38471] - add default values to the user inputs of credentials #1182

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

hsong-rh
Copy link
Contributor

@hsong-rh hsong-rh requested a review from a team as a code owner January 13, 2025 15:10
@hsong-rh hsong-rh force-pushed the AAP-38471 branch 3 times, most recently from e9dbe11 to fcbae35 Compare January 13, 2025 17:40
@hsong-rh hsong-rh force-pushed the AAP-38471 branch 8 times, most recently from 17a7567 to d4292bd Compare January 14, 2025 15:18
Copy link
Collaborator

@Alex-Izquierdo Alex-Izquierdo left a comment

Choose a reason for hiding this comment

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

I don't want to be a pain, but I really think all the static functions should have unit tests, especially since they are pure functions and therefore easy to test. In this case, we have involved three of them without any tests: add_default_values_to_user_inputs, substitute_envs, and get_env_vars_from_credentials.

@hsong-rh
Copy link
Contributor Author

I don't want to be a pain, but I really think all the static functions should have unit tests, especially since they are pure functions and therefore easy to test. In this case, we have involved three of them without any tests: add_default_values_to_user_inputs, substitute_envs, and get_env_vars_from_credentials.

@Alex-Izquierdo I agree with you about test coverage. In this PR the test for add_default_values_to_user_inputs has already been included. The consumer test is a little bit different, the newly added test case test_handle_workers_with_env_vars has covered both substitute_envs and get_env_vars_from_credentials functions.

@hsong-rh hsong-rh merged commit e0cbe7f into ansible:main Jan 14, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants