Skip to content

Commit

Permalink
Merge pull request #542 from agrare/add_ems_pause_resume_specs
Browse files Browse the repository at this point in the history
Add EMS #pause! and #resume! specs
  • Loading branch information
kbrock authored Oct 3, 2023
2 parents 73c7cc1 + d8ae438 commit 072c9c9
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
14 changes: 14 additions & 0 deletions spec/models/manageiq/providers/azure/cloud_manager_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,20 @@
end
end

context "#pause!" do
let(:zone) { FactoryBot.create(:zone) }
let(:ems) { FactoryBot.create(:ems_azure, :zone => zone) }

include_examples "ExtManagementSystem#pause!"
end

context "#resume!" do
let(:zone) { FactoryBot.create(:zone) }
let(:ems) { FactoryBot.create(:ems_azure, :zone => zone) }

include_examples "ExtManagementSystem#resume!"
end

it "does not create orphaned network_manager" do
# When the cloud_manager is destroyed during a refresh the there will still be an instance
# of the cloud_manager in the refresh worker. After the refresh we will try to save the cloud_manager
Expand Down
23 changes: 23 additions & 0 deletions spec/models/manageiq/providers/azure/container_manager_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
describe ManageIQ::Providers::Azure::ContainerManager do
it ".ems_type" do
expect(described_class.ems_type).to eq('aks')
end

it ".description" do
expect(described_class.description).to eq('Azure Kubernetes Service')
end

context "#pause!" do
let(:zone) { FactoryBot.create(:zone) }
let(:ems) { FactoryBot.create(:ems_azure_aks, :zone => zone) }

include_examples "ExtManagementSystem#pause!"
end

context "#resume!" do
let(:zone) { FactoryBot.create(:zone) }
let(:ems) { FactoryBot.create(:ems_azure_aks, :zone => zone) }

include_examples "ExtManagementSystem#resume!"
end
end

0 comments on commit 072c9c9

Please sign in to comment.