Sha256: 2dd41bb935bc84806a6a40cf33e2bd0312c4e9001b02b18ce4040f4f365b87d1
Contents?: true
Size: 1.51 KB
Versions: 91
Compression:
Stored size: 1.51 KB
Contents
require 'spec_helper' class TestRestartDeploy < EY::Serverside::Deploy attr_reader :call_order def initialize(*a) super @call_order = [] end def require_custom_tasks() @call_order << 'require_custom_tasks' end def restart() @call_order << 'restart' end def enable_maintenance_page() @call_order << 'enable_maintenance_page' end def disable_maintenance_page() @call_order << 'disable_maintenance_page' end end describe "EY::Serverside::Deploy#restart_with_maintenance_page" do class TestRestartWithMaintenancePage < TestRestartDeploy def conditionally_enable_maintenance_page() @call_order << 'conditionally_enable_maintenance_page' end end it "puts up the maintenance page if necessary, restarts, and takes down the maintenance page" do deployer = TestRestartWithMaintenancePage.new(EY::Serverside::Deploy::Configuration.new) deployer.restart_with_maintenance_page deployer.call_order.should == %w( require_custom_tasks conditionally_enable_maintenance_page restart disable_maintenance_page ) end end describe "glassfish stack" do it "requires a maintenance page" do config = EY::Serverside::Deploy::Configuration.new(:stack => 'glassfish') deployer = TestRestartDeploy.new(config) deployer.restart_with_maintenance_page deployer.call_order.should include('enable_maintenance_page') end end
Version data entries
91 entries across 91 versions & 1 rubygems