Skip to content

Conversation

@s-hertel
Copy link
Contributor

@s-hertel s-hertel commented Jul 7, 2016

ISSUE TYPE
  • Bugfix Pull Request
ANSIBLE VERSION
ansible 2.1.0.0
  config file =
  configured module search path = Default w/o overrides
SUMMARY

find() returns -1 if it fails and the string 'galaxy_tags' isn't in ever in display_result in this test. The bug doesn't result in any errors because the logic is sort of inverted- i.e. if it finds galaxy_tags indented twice (which it won't, since galaxy_tags isn't there) then raise an error informing user that galaxy_tags should be indented twice.
I changed it to find something that is supposed to be there (galaxy_info) and changed the logic to raise an error if it is not found.

before fix:

shertel-OSX:ansible shertel$ PYTHONPATH=./lib nosetests -d -w test/units -v -s cli.test_galaxy
test_display_galaxy_info (cli.test_galaxy.TestGalaxy) ... ok
test_display_min (cli.test_galaxy.TestGalaxy) ... ok
test_init (cli.test_galaxy.TestGalaxy) ... ok

----------------------------------------------------------------------
Ran 3 tests in 0.001s

OK

after fix:

shertel-OSX:ansible shertel$ PYTHONPATH=./lib nosetests -d -w test/units -v -s cli.test_galaxy
test_display_galaxy_info (cli.test_galaxy.TestGalaxy) ... ok
test_display_min (cli.test_galaxy.TestGalaxy) ... ok
test_init (cli.test_galaxy.TestGalaxy) ... ok

----------------------------------------------------------------------
Ran 3 tests in 0.001s

OK

@s-hertel
Copy link
Contributor Author

Closed in favor of #16783; just updated for merge conflicts.

@s-hertel s-hertel closed this Jul 21, 2016
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bugfix_pull_request labels Mar 5, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug This issue/PR relates to a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants