diff --git a/spec/models/service_ansible_playbook_spec.rb b/spec/models/service_ansible_playbook_spec.rb index bbec46e3f93d..d6859295eab5 100644 --- a/spec/models/service_ansible_playbook_spec.rb +++ b/spec/models/service_ansible_playbook_spec.rb @@ -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 @@ -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 ) @@ -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