diff --git a/engines/scc_proxy/spec/requests/api/connect/v3/systems/products_controller_spec.rb b/engines/scc_proxy/spec/requests/api/connect/v3/systems/products_controller_spec.rb index 1e11f91e9..f023a15b9 100644 --- a/engines/scc_proxy/spec/requests/api/connect/v3/systems/products_controller_spec.rb +++ b/engines/scc_proxy/spec/requests/api/connect/v3/systems/products_controller_spec.rb @@ -349,7 +349,7 @@ context 'when system is connected to SCC' do let(:system_payg) do - FactoryBot.create(:system, :payg, :with_system_information_az, :with_activated_base_product, instance_data: instance_data, + FactoryBot.create(:system, :payg, :with_system_information, :with_activated_base_product, instance_data: instance_data, system_token: new_system_token) end let(:product) do @@ -416,7 +416,7 @@ allow(FileUtils).to receive(:mkdir_p) allow(FileUtils).to receive(:touch) allow(InstanceVerification::Providers::Example).to receive(:new).and_return(plugin_double) - allow(plugin_double).to receive(:basic?).and_return(false) + allow(plugin_double).to receive(:allowed_extension?).and_return(true) allow(InstanceVerification).to receive(:write_cache_file).twice.with( Rails.application.config.repo_cache_dir, "127.0.0.1-#{system_payg.login}-#{product.id}" ) @@ -428,7 +428,7 @@ context 'when LTSS not allowed' do before do - allow(plugin_double).to receive(:basic?).and_return(true) + allow(plugin_double).to receive(:allowed_extension?).and_return(false) end it 'raises an error' do @@ -463,7 +463,7 @@ context 'when system is connected to SCC' do let(:system_payg) do - FactoryBot.create(:system, :payg, :with_system_information_az, :with_activated_base_product, instance_data: instance_data, + FactoryBot.create(:system, :payg, :with_system_information, :with_activated_base_product, instance_data: instance_data, system_token: new_system_token) end let(:product) do diff --git a/spec/factories/systems.rb b/spec/factories/systems.rb index 2f3197f36..8fb81aa38 100644 --- a/spec/factories/systems.rb +++ b/spec/factories/systems.rb @@ -70,19 +70,6 @@ end end - trait :with_system_information_az do - system_information do - { - cpus: 2, - sockets: 1, - hypervisor: nil, - arch: 'x86_64', - uuid: SecureRandom.uuid, - cloud_provider: 'Microsoft' - }.to_json - end - end - trait :with_system_token do sequence(:system_token) { |n| "00000000-0000-4000-9000-#{n.to_s.rjust(12, '0')}" } end