Sha256: 75cdd35e794ff05adf5a0a01741f9034e31a0609b95be4b226dd289b1c8610c2

Contents?: true

Size: 839 Bytes

Versions: 5

Compression:

Stored size: 839 Bytes

Contents

require 'spec_helper'

describe "ey rollback" do
  given "integration"

  def command_to_run(opts)
    cmd = "rollback"
    cmd << " -e #{opts[:env]}" if opts[:env]
    cmd << " -a #{opts[:app]}" if opts[:app]
    cmd << " --verbose" if opts[:verbose]
    cmd
  end

  def verify_ran(scenario)
    @out.should match(/Rolling back.*#{scenario[:application]}.*#{scenario[:environment]}/)
    @err.should be_empty
    @ssh_commands.last.should match(/eysd.*deploy rollback.*--app #{scenario[:application]}/)
  end

  it_should_behave_like "it takes an environment name"
  it_should_behave_like "it takes an app name"
  it_should_behave_like "it invokes eysd"

  it "passes along the web server stack to eysd" do
    api_scenario "one app, one environment"
    ey "rollback"
    @ssh_commands.last.should =~ /--stack nginx_mongrel/
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
engineyard-0.9.0 spec/ey/rollback_spec.rb
engineyard-0.8.2 spec/ey/rollback_spec.rb
engineyard-0.8.1 spec/ey/rollback_spec.rb
engineyard-0.8.0 spec/ey/rollback_spec.rb
engineyard-0.7.1 spec/ey/rollback_spec.rb