Sha256: 7894ed5614cb1eab08d7cf02ea50f3dfb69e438bfcc7f24a7524c1f60be9a2d5

Contents?: true

Size: 1.38 KB

Versions: 51

Compression:

Stored size: 1.38 KB

Contents

require 'spec_helper'

describe EY::Serverside::Adapter::Rollback do
  it_should_behave_like "it installs engineyard-serverside"

  it_should_behave_like "it accepts app"
  it_should_behave_like "it accepts framework_env"
  it_should_behave_like "it accepts instances"
  it_should_behave_like "it accepts stack"
  it_should_behave_like "it accepts verbose"

  it_should_require :app
  it_should_require :framework_env
  it_should_require :instances
  it_should_require :stack

  context "with valid arguments" do
    let(:command) do
      adapter = described_class.new do |arguments|
        arguments.app           = "rackapp"
        arguments.framework_env = 'production'
        arguments.instances     = [{:hostname => 'localhost', :roles => %w[han solo], :name => 'chewie'}]
        arguments.stack         = "nginx_unicorn"
        arguments.config        = {'a' => 1}
      end
      last_command(adapter)
    end

    it "puts the config in the command line as json" do
      command.should =~ /--config '#{Regexp.quote '{"a":1}'}'/
    end

    it "invokes exactly the right command" do
      command.should == "engineyard-serverside _#{EY::Serverside::Adapter::ENGINEYARD_SERVERSIDE_VERSION}_ deploy rollback --app rackapp --config '{\"a\":1}' --framework-env production --instance-names localhost:chewie --instance-roles localhost:han,solo --instances localhost --stack nginx_unicorn"
    end
  end
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
engineyard-serverside-adapter-1.6.4 spec/rollback_spec.rb
engineyard-serverside-adapter-1.6.4.pre6 spec/rollback_spec.rb
engineyard-serverside-adapter-1.6.4.pre5 spec/rollback_spec.rb
engineyard-serverside-adapter-1.6.4.pre4 spec/rollback_spec.rb
engineyard-serverside-adapter-1.6.4.pre3 spec/rollback_spec.rb
engineyard-serverside-adapter-1.6.4.pre2 spec/rollback_spec.rb
engineyard-serverside-adapter-1.6.4.pre spec/rollback_spec.rb
engineyard-serverside-adapter-1.6.3 spec/rollback_spec.rb
engineyard-serverside-adapter-1.5.35.pre.2 spec/rollback_spec.rb
engineyard-serverside-adapter-1.5.35.pre.1 spec/rollback_spec.rb
engineyard-serverside-adapter-1.5.35.pre spec/rollback_spec.rb
engineyard-serverside-adapter-1.5.33 spec/rollback_spec.rb
engineyard-serverside-adapter-1.5.32 spec/rollback_spec.rb
engineyard-serverside-adapter-1.5.30 spec/rollback_spec.rb
engineyard-serverside-adapter-1.5.28 spec/rollback_spec.rb
engineyard-serverside-adapter-1.5.27 spec/rollback_spec.rb
engineyard-serverside-adapter-1.5.26 spec/rollback_spec.rb
engineyard-serverside-adapter-1.5.25 spec/rollback_spec.rb
engineyard-serverside-adapter-1.5.24 spec/rollback_spec.rb
engineyard-serverside-adapter-1.5.21 spec/rollback_spec.rb