Sha256: 58a63e127b9341411eccb33485d5a4b1b1087d0d5e5b489c40312229d5ed95c6

Contents?: true

Size: 938 Bytes

Versions: 15

Compression:

Stored size: 938 Bytes

Contents

require 'spec_helper'

describe "ey logs" do
  given "integration"

  it "prints logs returned by awsm" do
    api_scenario "one app, one environment"
    ey %w[logs -e giblets]
    @out.should match(/MAIN LOG OUTPUT/)
    @out.should match(/CUSTOM LOG OUTPUT/)
    @err.should be_empty
  end

  it "complains when it can't infer the environment" do
    api_scenario "one app, many environments"
    ey %w[logs], :expect_failure => true
    @err.should =~ /repository url in this directory is ambiguous/i
  end
end

describe "ey logs" do
  given "integration"

  def command_to_run(opts)
    cmd = ["logs"]
    cmd << "--environment" << opts[:environment] if opts[:environment]
    cmd << "--account"     << opts[:account]     if opts[:account]
    cmd
  end

  def verify_ran(scenario)
    @out.should match(/Main logs for #{scenario[:environment]}/)
  end

  it_should_behave_like "it takes an environment name and an account name"
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
engineyard-1.4.0 spec/ey/logs_spec.rb
engineyard-1.3.33 spec/ey/logs_spec.rb
engineyard-1.3.32 spec/ey/logs_spec.rb
engineyard-1.3.31 spec/ey/logs_spec.rb
engineyard-1.3.30 spec/ey/logs_spec.rb
engineyard-1.3.29 spec/ey/logs_spec.rb
engineyard-1.3.28 spec/ey/logs_spec.rb
engineyard-1.3.25 spec/ey/logs_spec.rb
engineyard-1.3.22 spec/ey/logs_spec.rb
engineyard-1.3.21 spec/ey/logs_spec.rb
engineyard-1.3.20 spec/ey/logs_spec.rb
engineyard-1.3.19 spec/ey/logs_spec.rb
engineyard-1.3.18 spec/ey/logs_spec.rb
engineyard-1.3.17 spec/ey/logs_spec.rb
engineyard-1.3.16 spec/ey/logs_spec.rb