Skip to content

Commit

Permalink
remove specs that are no longer necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
nasark authored and agrare committed Oct 14, 2022
1 parent 6cf22fd commit 674f480
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 75 deletions.
13 changes: 0 additions & 13 deletions spec/database_configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -384,19 +384,6 @@ def say(*_args)
end
end
end

describe "#start_evm" do
it "forks and detaches the service start command" do
expect(@config).to receive(:fork) do |&block|
service = double(:service)
expect(ManageIQ::ApplianceConsole::EvmServer).to receive(:start).with(:enable => true).and_return(service)
block.call
1234 # return a test pid
end
expect(Process).to receive(:detach).with(1234)
@config.start_evm
end
end
end

context "with test database yml file" do
Expand Down
14 changes: 0 additions & 14 deletions spec/internal_database_configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,6 @@
expect(described_class.postgresql_template.to_s).to end_with("TEMPLATE/var/lib/pgsql/data")
end

describe "#post_activation" do
it "doesnt start evm if run_as_evm_server is false" do
@config.run_as_evm_server = false
expect(@config).not_to receive(:start_evm)
@config.post_activation
end

it "starts evm if run_as_evm_server is true" do
@config.run_as_evm_server = true
expect(@config).to receive(:start_evm)
@config.post_activation
end
end

describe "#initialize_postgresql_disk" do
before do
lvm = double("LogicalVolumeManagement", :setup => nil)
Expand Down
16 changes: 0 additions & 16 deletions spec/message_configuration_client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -332,20 +332,4 @@
expect(subject.send(:fetch_truststore_from_server)).to be_nil
end
end

describe "#restart_evmserverd" do
it "restarts evmserverd if it is running" do
expect(subject).to receive(:say)
expect(ManageIQ::ApplianceConsole::EvmServer).to receive(:running?).and_return(true)
expect(ManageIQ::ApplianceConsole::EvmServer).to receive(:restart)
expect(subject.send(:restart_evmserverd)).to be_nil
end

it "does not restart evmserverd if it is not running" do
expect(subject).to receive(:say)
expect(ManageIQ::ApplianceConsole::EvmServer).to receive(:running?).and_return(false)
expect(ManageIQ::ApplianceConsole::EvmServer).to_not receive(:restart)
expect(subject.send(:restart_evmserverd)).to be_nil
end
end
end
32 changes: 0 additions & 32 deletions spec/message_configuration_server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -286,38 +286,6 @@
end
end

describe "#restart_services" do
before do
expect(subject).to receive(:say).exactly(3).times
@evmserverd = ManageIQ::ApplianceConsole::EvmServer

zookeeper = LinuxAdmin::Service.new("zookeeper")
expect(zookeeper).to receive(:start).and_return(zookeeper)
expect(zookeeper).to receive(:enable)

kafka = LinuxAdmin::Service.new("kafka")
expect(kafka).to receive(:start).and_return(kafka)
expect(kafka).to receive(:enable)

expect(LinuxAdmin::Service).to receive(:new).with("zookeeper").and_return(zookeeper)
expect(LinuxAdmin::Service).to receive(:new).with("kafka").and_return(kafka)
end

it "starts the needed services" do
expect(@evmserverd).to receive(:running?).and_return(true)
expect(@evmserverd).to receive(:restart)

subject.send(:restart_services)
end

it "does not restart evmserverd if it is not running" do
expect(@evmserverd).to receive(:running?).and_return(false)
expect(@evmserverd).to_not receive(:restart)

subject.send(:restart_services)
end
end

describe "#configured?" do
it "returns true if the kafka service is running" do
kafka = LinuxAdmin::Service.new("kafka")
Expand Down

0 comments on commit 674f480

Please sign in to comment.