Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Commit

Permalink
Bug 1111077 - Enforce FrontendHttpServer state to match .state file
Browse files Browse the repository at this point in the history
* Update tests
  • Loading branch information
jwhonce committed Jun 30, 2014
1 parent d3834df commit 8f1389d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions node/test/unit/gear_state_plugin_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,23 @@ def test_unknown
end

def test_stopped
OpenShift::Runtime::ApplicationContainer.expects(:from_uuid).returns nil
container = mock("ApplicationContainer")
container.expects(:idle?).returns false
OpenShift::Runtime::FrontendHttpServer.expects(:new).with(nil).returns container

@op.expects(:call).never
plugin = GearStatePlugin.new(nil, @no_logger, @gears, @op)
setup_mocks(plugin, OpenShift::Runtime::State::STOPPED, [])
plugin.apply(@iteration)
end

def test_stopped_pids
OpenShift::Runtime::ApplicationContainer.expects(:from_uuid).returns nil
container = mock("ApplicationContainer")
container.expects(:idle?).returns false
OpenShift::Runtime::FrontendHttpServer.expects(:new).with(nil).returns container

@op.expects(:call).with(:stop, @uuid).once

plugin = GearStatePlugin.new(nil, @no_logger, @gears, @op)
Expand Down

0 comments on commit 8f1389d

Please sign in to comment.