From 3c01363e797c1db1095f3991d536185755f8debe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Hal=C3=A1sz?= Date: Fri, 28 Jun 2019 13:21:25 +0200 Subject: [PATCH 1/3] Updated RBAC features and roles for remote consoles https://bugzilla.redhat.com/show_bug.cgi?id=1532720 --- db/fixtures/miq_product_features.yml | 16 ++----- db/fixtures/miq_user_roles.yml | 62 ++++++++-------------------- 2 files changed, 22 insertions(+), 56 deletions(-) diff --git a/db/fixtures/miq_product_features.yml b/db/fixtures/miq_product_features.yml index 97daf251291..0d46755cd58 100644 --- a/db/fixtures/miq_product_features.yml +++ b/db/fixtures/miq_product_features.yml @@ -5475,20 +5475,12 @@ :description: Restart the Guest OS on VMs :feature_type: control :identifier: vm_guest_restart - - :name: Console using MKS + - :name: Console using HTML5 :description: Open a web-based console for VMs :feature_type: control - :identifier: vm_console - - :name: Console using WebMKS - :description: Open a web-based console for VMs - :feature_type: control - :identifier: vm_webmks_console - - :name: Console using VNC - :description: Open a web-based VNC console for VMs - :feature_type: control - :identifier: vm_vnc_console + :identifier: vm_html5_console - :name: Console using VMRC - :description: Open a web-based VMRC console for VMs + :description: Open a VMRC console for VMs :feature_type: control :identifier: vm_vmrc_console - :name: Cockpit Console @@ -6527,7 +6519,7 @@ - :name: Open Remote Console :description: Open Remote Console :feature_type: control - :identifier: sui_vm_console + :identifier: sui_vm_html5_console - :name: Open Web Console :description: Open Web Console :feature_type: control diff --git a/db/fixtures/miq_user_roles.yml b/db/fixtures/miq_user_roles.yml index 0e3724924b1..e3f7f66d1e4 100644 --- a/db/fixtures/miq_user_roles.yml +++ b/db/fixtures/miq_user_roles.yml @@ -159,12 +159,10 @@ - storage_tag - timeline - vm_check_compliance - - vm_console - - vm_webmks_console - vm_cloud_explorer - vm_explorer - vm_infra_explorer - - vm_vnc_console + - vm_html5_console - vm_vmrc_console - cockpit_console - vm_perf @@ -177,8 +175,7 @@ - vm_chargeback - sui_services_view - sui_vm_details_view - - sui_vm_console - - sui_vm_web_console + - sui_vm_html5_console - sui_vm_tags - sui_orders_view - sui_notifications @@ -261,13 +258,11 @@ - vm_view - vm_check_compliance - vm_compare - - vm_console - vm_drift - - vm_webmks_console - vm_cloud_explorer - vm_explorer - vm_infra_explorer - - vm_vnc_console + - vm_html5_console - vm_vmrc_console - cockpit_console - vm_perf @@ -279,8 +274,7 @@ - vm_chargeback - sui_services_view - sui_vm_details_view - - sui_vm_console - - sui_vm_web_console + - sui_vm_html5_console - sui_vm_tags - sui_notifications @@ -321,12 +315,10 @@ - provider_foreman_explorer - vm_clone - vm_compare - - vm_console - - vm_webmks_console - vm_cloud_explorer - vm_explorer - vm_infra_explorer - - vm_vnc_console + - vm_html5_console - vm_vmrc_console - cockpit_console - vm_drift @@ -348,8 +340,7 @@ - vm_chargeback - sui_services_view - sui_vm_details_view - - sui_vm_console - - sui_vm_web_console + - sui_vm_html5_console - sui_vm_start - sui_vm_stop - sui_vm_suspend @@ -449,12 +440,10 @@ - vm_check_compliance - vm_collect_running_processes - vm_compare - - vm_console - - vm_webmks_console - vm_cloud_explorer - vm_explorer - vm_infra_explorer - - vm_vnc_console + - vm_html5_console - vm_vmrc_console - cockpit_console - vm_drift @@ -476,12 +465,11 @@ - vm_chargeback - sui_services_view - sui_vm_details_view - - sui_vm_console - - sui_vm_web_console - - sui_vm_tags + - sui_vm_html5_console - sui_vm_start - sui_vm_stop - sui_vm_suspend + - sui_vm_tags - sui_notifications - :name: EvmRole-security @@ -634,12 +622,10 @@ - timeline - vm_check_compliance - vm_collect_running_processes - - vm_console - - vm_webmks_console - vm_cloud_explorer - vm_explorer - vm_infra_explorer - - vm_vnc_console + - vm_html5_console - vm_vmrc_console - cockpit_console - vm_compare @@ -654,8 +640,7 @@ - vm_chargeback - sui_services_view - sui_vm_details_view - - sui_vm_console - - sui_vm_web_console + - sui_vm_html5_console - sui_vm_tags - sui_notifications @@ -723,12 +708,10 @@ - storage_tag - timeline - vm_check_compliance - - vm_console - - vm_webmks_console - vm_cloud_explorer - vm_explorer - vm_infra_explorer - - vm_vnc_console + - vm_html5_console - vm_vmrc_console - cockpit_console - vm_compare @@ -742,8 +725,7 @@ - vm_chargeback - sui_services_view - sui_vm_details_view - - sui_vm_console - - sui_vm_web_console + - sui_vm_html5_console - sui_vm_tags - sui_orders_view - sui_orders_operations @@ -818,10 +800,9 @@ - sui_orders_operations - sui_orders_view - sui_services_view - - sui_vm_console - sui_vm_details_view + - sui_vm_html5_console - sui_vm_tags - - sui_vm_web_console - timeline - vm_cloud_explorer - vm_explorer @@ -920,12 +901,8 @@ - service_retire_now - service_view - svc_catalog_provision - - vm_console - - vm_webmks_console - vm_clone - vm_cloud_explorer - - vm_console - - vm_webmks_console - vm_drift - vm_edit - vm_guest_restart @@ -948,7 +925,7 @@ - vm_timeline - vm_chargeback - vm_vmrc_console - - vm_vnc_console + - vm_html5_console - cockpit_console - sui @@ -980,8 +957,6 @@ - vm_cloud_explorer - vm_collect_running_processes - vm_compare - - vm_console - - vm_webmks_console - vm_drift - vm_explorer - vm_guest_restart @@ -1005,16 +980,15 @@ - vm_timeline - vm_chargeback - vm_vmrc_console - - vm_vnc_console + - vm_html5_console - cockpit_console - sui_vm_details_view - - sui_vm_console - - sui_vm_web_console - - sui_vm_tags + - sui_vm_html5_console - sui_vm_retire - sui_vm_start - sui_vm_stop - sui_vm_suspend + - sui_vm_tags - sui_orders_view - sui_orders_operations - sui_notifications From 32ea2e9cc9fc91bafbd3fdd7d745dc2c6d69a748 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Hal=C3=A1sz?= Date: Mon, 1 Jul 2019 14:23:31 +0200 Subject: [PATCH 2/3] Drop the global vmware remote console type setting https://bugzilla.redhat.com/show_bug.cgi?id=1532720 --- app/models/vm.rb | 4 ---- app/models/vm/operations.rb | 6 +++--- config/settings.yml | 1 - spec/models/vm/operations_spec.rb | 13 ++++++------- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/app/models/vm.rb b/app/models/vm.rb index 60674eb56fc..58477b5f25b 100644 --- a/app/models/vm.rb +++ b/app/models/vm.rb @@ -164,8 +164,4 @@ def cockpit_support :message => unsupported_reason(:launch_cockpit) } end - - def console_supports_type?(console_type) - Settings.server.remote_console_type.upcase == console_type.upcase ? console_supported?(console_type) : false - end end diff --git a/app/models/vm/operations.rb b/app/models/vm/operations.rb index 57e5025b74b..286ab675d79 100644 --- a/app/models/vm/operations.rb +++ b/app/models/vm/operations.rb @@ -12,7 +12,7 @@ module Vm::Operations supports :vnc_console do message = "VNC Console not supported" if vendor == 'vmware' - unsupported_reason_add(:vnc_console, message) unless ext_management_system.present? && console_supports_type?('VNC') + unsupported_reason_add(:vnc_console, message) unless ext_management_system.present? && console_supported?('VNC') elsif !console_supported?('VNC') unsupported_reason_add(:vnc_console, message) end @@ -22,13 +22,13 @@ module Vm::Operations message = "WebMKS Console not supported" if vendor != 'vmware' unsupported_reason_add(:mks_console, message) - elsif console_supported?('WEBMKS') && !console_supports_type?('WebMKS') + elsif console_supported?('WEBMKS') && !console_supported?('WebMKS') unsupported_reason_add(:mks_console, message) end end supports :vmrc_console do - unsupported_reason_add(:vmrc_console, "VMRC Console not supported") unless console_supports_type?('VMRC') + unsupported_reason_add(:vmrc_console, "VMRC Console not supported") unless console_supported?('VMRC') end supports :spice_console do diff --git a/config/settings.yml b/config/settings.yml index 7328b0f2b70..040bbfe4b10 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -1008,7 +1008,6 @@ :prefetch_min_per_worker_dequeue: 10 :prefetch_stale_threshold: 30.seconds :rails_server: puma - :remote_console_type: VMRC :role: database_operations,event,reporting,scheduler,smartstate,ems_operations,ems_inventory,user_interface,remote_console,web_services,automate :server_dequeue_frequency: 5.seconds :server_log_frequency: 5.minutes diff --git a/spec/models/vm/operations_spec.rb b/spec/models/vm/operations_spec.rb index e21fca1b872..41f57d6d95e 100644 --- a/spec/models/vm/operations_spec.rb +++ b/spec/models/vm/operations_spec.rb @@ -63,7 +63,7 @@ context '#supports_vnc_console?' do it 'does not support it for vmware vms if it is not the specified console type in settings' do allow(@vm).to receive(:vendor).and_return('vmware') - allow(@vm).to receive(:console_supports_type?).with('VNC').and_return(false) + allow(@vm).to receive(:console_supported?).with('VNC').and_return(false) expect(@vm.supports_vnc_console?).to be_falsey expect(@vm.unsupported_reason(:vnc_console)).to include('VNC Console not supported') @@ -80,7 +80,6 @@ it 'supports it if all conditions are met' do server = double allow(Settings).to receive(:server).and_return(server) - allow(server).to receive(:remote_console_type).and_return('VNC') expect(@vm.supports_vnc_console?).to be_truthy end @@ -96,7 +95,7 @@ it 'supports it if all conditions are met' do allow(@vm).to receive(:console_supported?).with('WEBMKS').and_return(true) - allow(@vm).to receive(:console_supports_type?).with('WebMKS').and_return(true) + allow(@vm).to receive(:console_supported?).with('WebMKS').and_return(true) expect(@vm.supports_mks_console?).to be_truthy end @@ -173,14 +172,14 @@ context '#supports_vmrc_console?' do it 'returns false if type is not supported' do - allow(@vm).to receive(:console_supports_type?).with('VMRC').and_return(false) + allow(@vm).to receive(:console_supported?).with('VMRC').and_return(false) expect(@vm.supports_vmrc_console?).to be_falsey expect(@vm.unsupported_reason(:vmrc_console)).to include('VMRC Console not supported') end it 'supports it if all conditions are met' do - allow(@vm).to receive(:console_supports_type?).with('VMRC').and_return(true) + allow(@vm).to receive(:console_supported?).with('VMRC').and_return(true) expect(@vm.supports_vmrc_console?).to be_truthy end @@ -188,14 +187,14 @@ context '#supports_spice_console?' do it 'returns false if type is not supported' do - allow(@vm).to receive(:console_supports_type?).with('SPICE').and_return(false) + allow(@vm).to receive(:console_supported?).with('SPICE').and_return(false) expect(@vm.supports_spice_console?).to be_falsey expect(@vm.unsupported_reason(:spice_console)).to include('Spice Console not supported') end it 'supports it if all conditions are met' do - allow(@vm).to receive(:console_supports_type?).with('SPICE').and_return(true) + allow(@vm).to receive(:console_supported?).with('SPICE').and_return(true) expect(@vm.supports_spice_console?).to be_truthy end From 304063e0967fd38f4c71b8c16201fc9cf9d1e816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Hal=C3=A1sz?= Date: Mon, 1 Jul 2019 21:20:52 +0200 Subject: [PATCH 3/3] Cleaned up VM operations for launching remote consoles https://bugzilla.redhat.com/show_bug.cgi?id=1532720 --- app/models/mixins/supports_feature_mixin.rb | 8 +- app/models/vm.rb | 30 +---- app/models/vm/operations.rb | 47 +------ spec/models/vm/operations_spec.rb | 140 ++------------------ spec/models/vm_spec.rb | 2 +- 5 files changed, 29 insertions(+), 198 deletions(-) diff --git a/app/models/mixins/supports_feature_mixin.rb b/app/models/mixins/supports_feature_mixin.rb index 24296514eb5..4fb0f52c263 100644 --- a/app/models/mixins/supports_feature_mixin.rb +++ b/app/models/mixins/supports_feature_mixin.rb @@ -89,15 +89,11 @@ module SupportsFeatureMixin :discovery => 'Discovery of Managers for a Provider', :evacuate => 'Evacuation', :cockpit_console => 'Cockpit Console', - :vnc_console => 'VNC Console', - :mks_console => 'MKS Console', + :html5_console => 'HTML5 Console', :vmrc_console => 'VMRC Console', - :spice_console => 'Spice Console', :launch_cockpit => 'Launch Cockpit UI', - :launch_vnc_console => 'Launch VNC Console', + :launch_html5_console => 'Launch HTML5 Console', :launch_vmrc_console => 'Launch VMRC Console', - :launch_mks_console => 'Launch WebMKS Console', - :launch_spice_console => 'Launch Spice Console', :admin_ui => 'Open Admin UI for a Provider', :live_migrate => 'Live Migration', :migrate => 'Migration', diff --git a/app/models/vm.rb b/app/models/vm.rb index 58477b5f25b..0103c18c78c 100644 --- a/app/models/vm.rb +++ b/app/models/vm.rb @@ -111,10 +111,8 @@ def remote_console_url=(url, user_id) def supported_consoles { - :spice => spice_support, - :vnc => vnc_support, + :html5 => html5_support, :vmrc => vmrc_support, - :webmks => webmks_support, :cockpit => cockpit_support } end @@ -125,38 +123,22 @@ def self.display_name(number = 1) private - def vnc_support + def html5_support { - :visible => supports_vnc_console?, - :enabled => supports_launch_vnc_console?, - :message => unsupported_reason(:launch_vnc_console) - } - end - - def webmks_support - { - :visible => supports_mks_console?, - :enabled => supports_launch_mks_console?, - :message => unsupported_reason(:launch_mks_console) + :visible => supports_html5_console?, + :enabled => supports_launch_html5_console?, + :message => unsupported_reason(:launch_html5_console) } end def vmrc_support { - :visible => supports_vnc_console?, + :visible => supports_vmrc_console?, :enabled => supports_launch_vmrc_console?, :message => unsupported_reason(:launch_vmrc_console) } end - def spice_support - { - :visible => supports_spice_console?, - :enabled => supports_launch_spice_console?, - :message => unsupported_reason(:launch_spice_console) - } - end - def cockpit_support { :visible => supports_cockpit_console?, diff --git a/app/models/vm/operations.rb b/app/models/vm/operations.rb index 286ab675d79..67cc1f79f27 100644 --- a/app/models/vm/operations.rb +++ b/app/models/vm/operations.rb @@ -9,38 +9,17 @@ module Vm::Operations include_concern 'Lifecycle' included do - supports :vnc_console do - message = "VNC Console not supported" - if vendor == 'vmware' - unsupported_reason_add(:vnc_console, message) unless ext_management_system.present? && console_supported?('VNC') - elsif !console_supported?('VNC') - unsupported_reason_add(:vnc_console, message) - end - end - - supports :mks_console do - message = "WebMKS Console not supported" - if vendor != 'vmware' - unsupported_reason_add(:mks_console, message) - elsif console_supported?('WEBMKS') && !console_supported?('WebMKS') - unsupported_reason_add(:mks_console, message) - end + supports :html5_console do + consup = %w[vnc webmks spice].any? { |type| send(:console_supported?, type) } + unsupported_reason_add(:html5_console, _("The web-based HTML5 Console is not supported")) unless consup end supports :vmrc_console do - unsupported_reason_add(:vmrc_console, "VMRC Console not supported") unless console_supported?('VMRC') + unsupported_reason_add(:vmrc_console, _("VMRC Console not supported")) unless console_supported?('VMRC') end - supports :spice_console do - unsupported_reason_add(:spice_console, "Spice Console not supported") unless console_supports_type?('SPICE') - end - - supports :launch_vnc_console do - if vendor == 'vmware' && ext_management_system.try(:api_version).to_f >= 6.5 - unsupported_reason_add(:launch_vnc_console, _('VNC consoles are unsupported on VMware ESXi 6.5 and later.')) - elsif power_state != 'on' - unsupported_reason_add(:launch_vnc_console, _('The web-based VNC console is not available because the VM is not powered on')) - end + supports :launch_html5_console do + unsupported_reason_add(:launch_html5_console, _("The web-based HTML5 Console is not available because the VM is not powered on")) unless power_state == 'on' end supports :launch_vmrc_console do @@ -50,20 +29,6 @@ module Vm::Operations unsupported_reason_add(:launch_vmrc_console, _('VM VMRC Console error: %{error}') % {:error => err}) end end - - supports :launch_mks_console do - if power_state != 'on' - unsupported_reason_add(:launch_mks_console, _('The web-based WebMKS console is not available because the VM is not powered on')) - elsif !Rails.root.join('public', 'webmks').exist? - unsupported_reason_add(:launch_mks_console, _("The web-based WebMKS console is not available because the required libraries aren't installed")) - end - end - - supports :launch_spice_console do - if power_state != 'on' - unsupported_reason_add(:launch_spice_console, _('The web-based spice console is not available because the VM is not powered on')) - end - end end def cockpit_url diff --git a/spec/models/vm/operations_spec.rb b/spec/models/vm/operations_spec.rb index 41f57d6d95e..b795fb6d505 100644 --- a/spec/models/vm/operations_spec.rb +++ b/spec/models/vm/operations_spec.rb @@ -60,117 +60,7 @@ end end - context '#supports_vnc_console?' do - it 'does not support it for vmware vms if it is not the specified console type in settings' do - allow(@vm).to receive(:vendor).and_return('vmware') - allow(@vm).to receive(:console_supported?).with('VNC').and_return(false) - - expect(@vm.supports_vnc_console?).to be_falsey - expect(@vm.unsupported_reason(:vnc_console)).to include('VNC Console not supported') - end - - it 'adds unsupported reason for non-vmware vms and unsupported types' do - allow(@vm).to receive(:vendor).and_return('amazon') - allow(@vm).to receive(:console_supported?).with('VNC').and_return(false) - - expect(@vm.supports_vnc_console?).to be_falsey - expect(@vm.unsupported_reason(:vnc_console)).to include('VNC Console not supported') - end - - it 'supports it if all conditions are met' do - server = double - allow(Settings).to receive(:server).and_return(server) - - expect(@vm.supports_vnc_console?).to be_truthy - end - end - - context '#supports_mks_console?' do - it 'is not supported if the console type is not supported' do - allow(@vm).to receive(:power_state).and_return('on') - - expect(@vm.supports_mks_console?).to be_falsey - expect(@vm.unsupported_reason(:mks_console)).to include('WebMKS Console not supported') - end - - it 'supports it if all conditions are met' do - allow(@vm).to receive(:console_supported?).with('WEBMKS').and_return(true) - allow(@vm).to receive(:console_supported?).with('WebMKS').and_return(true) - - expect(@vm.supports_mks_console?).to be_truthy - end - end - - context '#supports_launch_vnc_console?' do - before do - @ems_double = double - allow(@vm).to receive(:ext_management_system).and_return(@ems_double) - end - - it 'returns the correct error message if the vm vendor is vmware and it does not have an ext_management_system' do - allow(@vm).to receive(:ext_management_system).and_return(nil) - allow(@vm).to receive(:power_state).and_return('off') - - expect(@vm.supports_launch_vnc_console?).to be_falsey - expect(@vm.unsupported_reason(:launch_vnc_console)).to include('the VM is not powered on') - end - - it 'does not support if vendor is vmware and api version is >= 6.5' do - allow(@ems_double).to receive(:api_version).and_return('6.5') - allow(@vm).to receive(:vendor).and_return('vmware') - - expect(@vm.supports_launch_vnc_console?).to be_falsey - expect(@vm.unsupported_reason(:launch_vnc_console)).to include('unsupported on VMware ESXi 6.5 and later') - end - - it 'does not support if vm is not powered on' do - allow(@ems_double).to receive(:api_version).and_return('6.4') - allow(@vm).to receive(:power_state).and_return('off') - - expect(@vm.supports_launch_vnc_console?).to be_falsey - expect(@vm.unsupported_reason(:launch_vnc_console)).to include('the VM is not powered on') - end - - it 'supports it if all conditions are met' do - allow(@vm).to receive(:power_state).and_return('on') - allow(@vm).to receive(:vendor).and_return('vmware') - allow(@ems_double).to receive(:api_version).and_return('6.4') - - expect(@vm.supports_launch_vnc_console?).to be_truthy - end - end - - context '#supports_launch_mks_console?' do - before do - root, @join = double, double - allow(Rails).to receive(:root).and_return(root) - allow(root).to receive(:join).with('public', 'webmks').and_return(@join) - end - - it 'is not supported if the vm is not powered on' do - allow(@vm).to receive(:power_state).and_return('off') - - expect(@vm.supports_launch_mks_console?).to be_falsey - expect(@vm.unsupported_reason(:launch_mks_console)).to include('the VM is not powered on') - end - - it 'is not supported if the required libraries are not installed' do - allow(@join).to receive(:exist?).and_return(false) - allow(@vm).to receive(:power_state).and_return('on') - - expect(@vm.supports_launch_mks_console?).to be_falsey - expect(@vm.unsupported_reason(:launch_mks_console)).to include("the required libraries aren't installed") - end - - it 'supports it if all conditions are met' do - allow(@join).to receive(:exist?).and_return(true) - allow(@vm).to receive(:power_state).and_return('on') - - expect(@vm.supports_launch_mks_console?).to be_truthy - end - end - - context '#supports_vmrc_console?' do + describe '#supports_vmrc_console?' do it 'returns false if type is not supported' do allow(@vm).to receive(:console_supported?).with('VMRC').and_return(false) @@ -185,22 +75,20 @@ end end - context '#supports_spice_console?' do - it 'returns false if type is not supported' do - allow(@vm).to receive(:console_supported?).with('SPICE').and_return(false) - - expect(@vm.supports_spice_console?).to be_falsey - expect(@vm.unsupported_reason(:spice_console)).to include('Spice Console not supported') - end - + describe '#supports_html5_console?' do it 'supports it if all conditions are met' do - allow(@vm).to receive(:console_supported?).with('SPICE').and_return(true) + allow(@vm).to receive(:console_supported?).and_return(true) + expect(@vm.supports_html5_console?).to be_truthy + end - expect(@vm.supports_spice_console?).to be_truthy + it 'returns false if type is not supported' do + allow(@vm).to receive(:console_supported?).and_return(false) + expect(@vm.supports_html5_console?).to be_falsey + expect(@vm.unsupported_reason(:html5_console)).to include('HTML5 Console is not supported') end end - context '#supports_launch_vmrc_console?' do + describe '#supports_launch_vmrc_console?' do it 'does not support it if validate_remote_console_vmrc_support raises an error' do allow(@vm).to receive(:validate_remote_console_vmrc_support).and_raise(StandardError) @@ -215,18 +103,18 @@ end end - context '#supports_launch_spice_console?' do + describe '#supports_launch_html5_console?' do it 'does not support it if vm is not powered on' do allow(@vm).to receive(:power_state).and_return('off') - expect(@vm.supports_launch_spice_console?).to be_falsey - expect(@vm.unsupported_reason(:launch_spice_console)).to include('the VM is not powered on') + expect(@vm.supports_launch_html5_console?).to be_falsey + expect(@vm.unsupported_reason(:launch_html5_console)).to include('the VM is not powered on') end it 'supports it if all conditions are met' do allow(@vm).to receive(:power_state).and_return('on') - expect(@vm.supports_launch_spice_console?).to be_truthy + expect(@vm.supports_launch_html5_console?).to be_truthy end end end diff --git a/spec/models/vm_spec.rb b/spec/models/vm_spec.rb index d90ebdb595a..081b1a66591 100644 --- a/spec/models/vm_spec.rb +++ b/spec/models/vm_spec.rb @@ -307,7 +307,7 @@ context "#supported_consoles" do it 'returns all of the console types' do vm = FactoryBot.create(:vm) - expect(vm.supported_consoles.keys).to match_array([:spice, :vnc, :vmrc, :webmks, :cockpit]) + expect(vm.supported_consoles.keys).to match_array([:html5, :vmrc, :cockpit]) end end end