Sha256: 50dc784875fb713753c3c729f58db2d556c6c2e668ddb9f59f61b717807a2a9a

Contents?: true

Size: 690 Bytes

Versions: 37

Compression:

Stored size: 690 Bytes

Contents

require 'kontena/cli/nodes/update_command'

describe Kontena::Cli::Nodes::UpdateCommand do
  include ClientHelpers
  include OutputHelpers

  it 'PUTs with empty parameters by default' do
    expect(client).to receive(:put).with('nodes/test-grid/test-node', {})

    subject.run(['test-node'])
  end

  it 'PUTs with labels' do
    expect(client).to receive(:put).with('nodes/test-grid/test-node', {labels: ['test1=yes', 'test2=no']})

    subject.run(['-l', 'test1=yes', '--label=test2=no', 'test-node'])
  end

  it 'PUTs with empty labels' do
    expect(client).to receive(:put).with('nodes/test-grid/test-node', {labels: []})

    subject.run(['--clear-labels', 'test-node'])
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
kontena-cli-1.5.4 spec/kontena/cli/nodes/update_command_spec.rb
kontena-cli-1.5.4.rc1 spec/kontena/cli/nodes/update_command_spec.rb
kontena-cli-1.5.3 spec/kontena/cli/nodes/update_command_spec.rb
kontena-cli-1.5.2 spec/kontena/cli/nodes/update_command_spec.rb
kontena-cli-1.5.1 spec/kontena/cli/nodes/update_command_spec.rb
kontena-cli-1.5.0 spec/kontena/cli/nodes/update_command_spec.rb
kontena-cli-1.5.0.rc1 spec/kontena/cli/nodes/update_command_spec.rb
kontena-cli-1.5.0.pre5 spec/kontena/cli/nodes/update_command_spec.rb
kontena-cli-1.5.0.pre4 spec/kontena/cli/nodes/update_command_spec.rb
kontena-cli-1.5.0.pre3 spec/kontena/cli/nodes/update_command_spec.rb
kontena-cli-1.5.0.pre2 spec/kontena/cli/nodes/update_command_spec.rb
kontena-cli-1.5.0.pre1 spec/kontena/cli/nodes/update_command_spec.rb
kontena-cli-1.4.3 spec/kontena/cli/nodes/update_command_spec.rb
kontena-cli-1.4.3.rc1 spec/kontena/cli/nodes/update_command_spec.rb
kontena-cli-1.4.2 spec/kontena/cli/nodes/update_command_spec.rb
kontena-cli-1.4.2.rc1 spec/kontena/cli/nodes/update_command_spec.rb
kontena-cli-1.4.2.pre1 spec/kontena/cli/nodes/update_command_spec.rb
kontena-cli-1.4.1 spec/kontena/cli/nodes/update_command_spec.rb
kontena-cli-1.4.1.rc1 spec/kontena/cli/nodes/update_command_spec.rb
kontena-cli-1.4.1.pre1 spec/kontena/cli/nodes/update_command_spec.rb