From 165a21267bfe64e661b01165b1ce6b30ff79f40c Mon Sep 17 00:00:00 2001 From: Fabien Dupont Date: Wed, 30 Oct 2019 09:30:33 +0100 Subject: [PATCH 1/2] Add AuthenticationMixin to Vm --- app/models/vm.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/vm.rb b/app/models/vm.rb index 91cd9ee2deb..8c34ace9c1d 100644 --- a/app/models/vm.rb +++ b/app/models/vm.rb @@ -6,6 +6,7 @@ class Vm < VmOrTemplate include CustomActionsMixin include CiFeatureMixin include ExternalUrlMixin + include AuthenticationMixin include_concern 'Operations' From 76017c45e003b5db21240be8bb15acfe30332276 Mon Sep 17 00:00:00 2001 From: Fabien Dupont Date: Wed, 30 Oct 2019 11:17:52 +0100 Subject: [PATCH 2/2] Update conversion host specs to use VM auth --- spec/models/conversion_host_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/models/conversion_host_spec.rb b/spec/models/conversion_host_spec.rb index 52719a6c754..9b96c088228 100644 --- a/spec/models/conversion_host_spec.rb +++ b/spec/models/conversion_host_spec.rb @@ -416,7 +416,7 @@ end it "finds the credentials associated with the resource if credentials cannot be found for the conversion host" do - vm.ext_management_system.authentications << auth_default + vm.authentications << auth_default host.authentications << auth_default expect(conversion_host_vm.send(:find_credentials)).to eq(auth_default) expect(conversion_host_host.send(:find_credentials)).to eq(auth_default)