Skip to content

Commit

Permalink
configuration_workflow spec
Browse files Browse the repository at this point in the history
  • Loading branch information
jameswnl committed Jun 5, 2018
1 parent 2be511b commit cd60675
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
class ManageIQ::Providers::EmbeddedAnsible::Inventory::Parser::AutomationManager < ManagerRefresh::Inventory::Parser
include ManageIQ::Providers::AnsibleTower::Shared::Inventory::Parser::AutomationManager
def parse
inventory_root_groups
configured_systems
configuration_scripts
configuration_script_sources
credentials
end
end
1 change: 1 addition & 0 deletions spec/factories/configuration_script.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
:parent => :configuration_script_payload

factory :configuration_script, :class => "ConfigurationScript", :parent => :configuration_script_base
factory :configuration_workflow, :class => "ConfigurationWorkflow", :parent => :configuration_script_base
factory :ansible_configuration_script,
:class => "ManageIQ::Providers::AnsibleTower::AutomationManager::ConfigurationScript",
:parent => :configuration_script
Expand Down
7 changes: 7 additions & 0 deletions spec/factories/ext_management_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,13 @@
end
end

trait(:configuration_workflow) do
after(:create) do |x|
type = (x.type.split("::")[0..2] + %w(AutomationManager ConfigurationWorkflow)).join("::")
x.configuration_workflows << FactoryGirl.create(:configuration_workflow, :type => type)
end
end

# Leaf classes for automation_manager

factory :automation_manager_ansible_tower,
Expand Down

0 comments on commit cd60675

Please sign in to comment.