Skip to content

Commit

Permalink
Fix service_ansible_playbook specs to test credentials are passed in …
Browse files Browse the repository at this point in the history
…options
  • Loading branch information
carbonin committed Jul 15, 2019
1 parent 58e0541 commit 1566442
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spec/models/service_ansible_playbook_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@
basic_service.preprocess(action)
service.reload
expect(basic_service.options[:provision_job_options][:hosts]).to eq("default_host1,default_host2")
expect(basic_service.options[:provision_job_options][:credential]).to eq(credential_0.native_ref)
expect(basic_service.options[:provision_job_options][:vault_credential]).to eq(credential_3.native_ref)
end
end

Expand All @@ -129,6 +131,7 @@
service.reload
expect(service.options[:provision_job_options][:hosts]).to eq("host1,host2")
expect(service.options[:provision_job_options][:credential]).to eq(credential_1.native_ref)
expect(service.options[:provision_job_options][:vault_credential]).to eq(credential_3.native_ref)
expect(service.options[:provision_job_options][:extra_vars]).to eq(
'var1' => 'value1', 'var2' => 'value2', 'var3' => 'default_val3', 'pswd' => encrypted_val
)
Expand All @@ -150,7 +153,8 @@
expect(service.options[:retirement_job_options][:extra_vars]).to eq(
'var1' => 'default_val1', 'var2' => 'default_val2', 'var3' => 'default_val3'
)
expect(service.options[:retirement_job_options]).not_to have_key(:credential)
expect(service.options[:retirement_job_options][:credential]).to eq(credential_0.native_ref)
expect(service.options[:retirement_job_options][:vault_credential]).to eq(credential_3.native_ref)
end
end
end
Expand Down

0 comments on commit 1566442

Please sign in to comment.