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

Add test coverage for Embedded Ansible and eliminate redundant spec code #14383

Merged
merged 2 commits into from
Mar 17, 2017

Conversation

jameswnl
Copy link
Contributor

  • The 2 sets of specs are essentially the same between EmbeddedAnsible from AnsibleTower
  • After branching out EmbeddedAnsible from AnsibleTower, there have been new enhancements added and the new specs are only covering AnsibleTower.

This PR is to make the 2 sets of specs to use shared_examples to solve the above issues. Also make future enhancements easier to add test coverage without parity between the two.

@miq-bot add_labels refactoring, test, providers/ansible_tower

@miq-bot
Copy link
Member

miq-bot commented Mar 17, 2017

Some comments on commits jameswnl/manageiq@eb6be29~...c2465a8

spec/support/ansible_shared/automation_manager/configuration_script.rb

  • ⚠️ - 39 - Detected allow_any_instance_of. This RSpec method is highly discouraged, please only use when absolutely necessary.

spec/support/ansible_shared/automation_manager/job.rb

  • ⚠️ - 115 - Detected allow_any_instance_of. This RSpec method is highly discouraged, please only use when absolutely necessary.
  • ⚠️ - 144 - Detected allow_any_instance_of. This RSpec method is highly discouraged, please only use when absolutely necessary.
  • ⚠️ - 72 - Detected allow_any_instance_of. This RSpec method is highly discouraged, please only use when absolutely necessary.

@miq-bot
Copy link
Member

miq-bot commented Mar 17, 2017

Checked commits jameswnl/manageiq@eb6be29~...c2465a8 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
30 files checked, 7 offenses detected

spec/support/ansible_shared/automation_manager/configuration_script_source.rb

  • ❗ - Line 23, Col 9 - Style/AlignHash - Align the elements of a hash literal if they span more than one line.
  • ❗ - Line 24, Col 9 - Style/AlignHash - Align the elements of a hash literal if they span more than one line.
  • ❗ - Line 25, Col 9 - Style/AlignHash - Align the elements of a hash literal if they span more than one line.

spec/support/ansible_shared/automation_manager/credential.rb

  • ❗ - Line 21, Col 9 - Style/AlignHash - Align the elements of a hash literal if they span more than one line.
  • ❗ - Line 22, Col 9 - Style/AlignHash - Align the elements of a hash literal if they span more than one line.
  • ❗ - Line 23, Col 9 - Style/AlignHash - Align the elements of a hash literal if they span more than one line.

spec/support/ansible_shared/provider.rb

  • ❗ - Line 29, Col 48 - Style/AlignHash - Align the elements of a hash literal if they span more than one line.

@jameswnl
Copy link
Contributor Author

@jrafanie this is the one I talked to you about.

@blomquisg
Copy link
Member

This is purely test refactoring and tests are passing, so...

@blomquisg blomquisg merged commit a143dcd into ManageIQ:master Mar 17, 2017
@blomquisg blomquisg added this to the Sprint 57 Ending Mar 27, 2017 milestone Mar 17, 2017
@jameswnl jameswnl deleted the shared-tower-specs branch March 17, 2017 19:19
@durandom
Copy link
Member

yay, it's gonna be a fun time extracting ansible into an external provider

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

Successfully merging this pull request may close these issues.

5 participants