Sha256: bc4cf0c2bce16ede461e280cb9b67ab22a1c46a71faa7ea9affa1ed4b0343dd7

Contents?: true

Size: 1.28 KB

Versions: 6

Compression:

Stored size: 1.28 KB

Contents

require 'kontena/cli/nodes/show_command'

describe Kontena::Cli::Nodes::ShowCommand do
  include ClientHelpers
  include OutputHelpers
  include FixturesHelpers

  let(:subject) { described_class.new("kontena") }

  let(:node) {
    JSON.load(fixture('api/node.json'))
  }

  before do
    allow(client).to receive(:get).with('nodes/test-grid/core-01').and_return(node)
  end

  it "outputs the node info" do
    expect{subject.run(['core-01'])}.to output_lines([
      'development/core-01:',
      '  id: XI4K:NPOL:EQJ4:S4V7:EN3B:DHC5:KZJD:F3U2:PCAN:46EV:IO4A:63S5',
      '  agent version: 1.4.0.dev',
      '  docker version: 1.12.6',
      '  connected: yes',
      '  last connect: 2017-07-04T08:36:02.235Z',
      '  last seen: 2017-07-04T08:36:02.280Z',
      '  public ip: 91.150.10.190',
      '  private ip: 192.168.66.101',
      '  overlay ip: 10.81.0.1',
      '  os: Container Linux by CoreOS 1409.5.0 (Ladybug)',
      '  kernel: 4.11.6-coreos-r1',
      '  drivers:',
      '    storage: overlay',
      '    volume: local',
      '  initial node: yes',
      '  labels:',
      '    - test',
      '  stats:',
      '    cpus: 1',
      '    load: 1.49 0.34 0.11',
      '    memory: 0.39 of 0.97 GB',
      '    filesystem:',
      '      - /var/lib/docker: 2.89 of 15.57 GB',
    ])
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
kontena-cli-1.4.0.pre6 spec/kontena/cli/nodes/show_command_spec.rb
kontena-cli-1.4.0.pre5 spec/kontena/cli/nodes/show_command_spec.rb
kontena-cli-1.4.0.pre4 spec/kontena/cli/nodes/show_command_spec.rb
kontena-cli-1.4.0.pre3 spec/kontena/cli/nodes/show_command_spec.rb
kontena-cli-1.4.0.pre2 spec/kontena/cli/nodes/show_command_spec.rb
kontena-cli-1.4.0.pre1 spec/kontena/cli/nodes/show_command_spec.rb