From 41c0efd313bb134bf6d48be58e4ffbf593fbbfaf Mon Sep 17 00:00:00 2001 From: Adam Grare Date: Tue, 10 Dec 2024 10:34:43 -0500 Subject: [PATCH] Fix metric/ci_mixin_spec using kubevirt vm The metric/ci_mixin_spec was using a kubeivrt vm as an example of a class which doesn't support capture. This is no longer accurate as we have added C&U support for kubevirt, plus we shouldn't be using provider plugin classes in core. These specs are essentially testing that a class that includes a module with `supports :capture` responds to `.supports?(:capture)` with true which isn't actually testing anything. --- spec/models/metric/ci_mixin_spec.rb | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/spec/models/metric/ci_mixin_spec.rb b/spec/models/metric/ci_mixin_spec.rb index 9be783ad073..7ff76415f9a 100644 --- a/spec/models/metric/ci_mixin_spec.rb +++ b/spec/models/metric/ci_mixin_spec.rb @@ -63,26 +63,4 @@ end end end - - context "#supports?(:capture)" do - context "with a VM" do - let(:unsupported_vm) { FactoryBot.create(:vm_kubevirt) } - let(:supported_vm) { FactoryBot.create(:vm_vmware) } - - it "correctly checks capture support" do - expect(unsupported_vm.supports?(:capture)).to be_falsy - expect(supported_vm.supports?(:capture)).to be_truthy - end - end - - context "with a Host" do - let(:unsupported_host) { FactoryBot.create(:ibm_power_hmc_host) } - let(:supported_host) { FactoryBot.create(:host_vmware) } - - it "correctly checks capture support" do - expect(unsupported_host.supports?(:capture)).to be_falsy - expect(supported_host.supports?(:capture)).to be_truthy - end - end - end end