Sha256: 9b5a477a3d5e7788eb994e4b4562acfaf681b222d7352e91671016b967d496fa

Contents?: true

Size: 831 Bytes

Versions: 5

Compression:

Stored size: 831 Bytes

Contents

require 'spec_helper'

# to run specs with what's remembered from vcr
#   $ rake
#
# to run specs with new fresh data from aws api calls
#   $ rake clean:vcr ; time rake
describe Sonic::CLI do
  before(:all) do
    @args = "--project-root spec/fixtures/project --noop"
  end

  describe "sonic" do
    it "ssh should print out ssh command to be ran" do
      out = execute("bin/sonic ssh #{@args} --cluster default my-service")
      expect(out).to include("=> ssh")
    end

    it "execute should print that command has been sent" do
      out = execute("bin/sonic execute #{@args} 1,2,3 uptime")
      expect(out).to include("Command sent")
    end

    it "list should list running instances" do
      out = execute("bin/sonic list #{@args} --header 1,2,3")
      expect(out).to include("No instances found")
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sonic-screwdriver-1.4.0 spec/lib/cli_spec.rb
sonic-screwdriver-1.3.2 spec/lib/cli_spec.rb
sonic-screwdriver-1.3.0 spec/lib/cli_spec.rb
sonic-screwdriver-1.2.0 spec/lib/cli_spec.rb
sonic-screwdriver-1.1.1 spec/lib/cli_spec.rb