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

Test get_version_warning #2632

Merged
merged 2 commits into from Oct 30, 2022
Merged

Test get_version_warning #2632

merged 2 commits into from Oct 30, 2022

Conversation

apatard
Copy link
Contributor

@apatard apatard commented Oct 28, 2022

This change is testing that get_version_warning():

  • returns "" if current version is latest one
  • returns a pre-release information if using pre-release
  • returns a new release information and extra installation information. (note: this test doesn't check that guess_install_method() is working correctly)

I had to use pytest-mock to ensure that all test parameters are correctly set. The test should not rely on current version (since it's likely v1.2.3dev123) and on version on github.

Signed-off-by: Arnaud Patard apatard@hupstream.com

This change is testing that get_version_warning():
- returns "" if current version is latest one
- returns a pre-release information if using pre-release
- returns a new release information and extra installation information.
  (note: this test doesn't check that guess_install_method() is working correctly)

I had to use pytest-mock to ensure that all test parameters are
correctly set. The test should not rely on current version (since it's likely
v1.2.3dev123) and on version on github.

Signed-off-by: Arnaud Patard <apatard@hupstream.com>
@ssbarnea ssbarnea added the skip-changelog Can be missed from the changelog. label Oct 30, 2022
@ssbarnea ssbarnea merged commit d941313 into ansible:main Oct 30, 2022
ssbarnea added a commit to ssbarnea/ansible-lint that referenced this pull request Nov 11, 2022
This change is testing that get_version_warning():
- returns "" if current version is latest one
- returns a pre-release information if using pre-release
- returns a new release information and extra installation information.
  (note: this test doesn't check that guess_install_method() is working correctly)

I had to use pytest-mock to ensure that all test parameters are
correctly set. The test should not rely on current version (since it's likely
v1.2.3dev123) and on version on github.

Signed-off-by: Arnaud Patard <apatard@hupstream.com>

Signed-off-by: Arnaud Patard <apatard@hupstream.com>
Co-authored-by: Sorin Sbarnea <ssbarnea@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog Can be missed from the changelog.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants