Sha256: 9fad494611a83b3f252b79872d0e3ea0bf7f3c5fe53f27fec198d0455e7e6d7b

Contents?: true

Size: 798 Bytes

Versions: 69

Compression:

Stored size: 798 Bytes

Contents

require "kontena/cli/services/containers_command"

describe Kontena::Cli::Services::ContainersCommand do

  include ClientHelpers

  describe '#execute' do
    it 'to not throw on missing "overlay_cidr" property' do
      allow(client).to receive(:get).and_return({
        'containers' => [
          {'id' => "service-a-id", 'node' => {'public_ip' => ""}}
        ]
      })
      expect {
        subject.run(['service-a'])
      }.to_not raise_error
    end

    it 'to not throw on nil "overlay_cidr" property' do
      allow(client).to receive(:get).and_return({
        'containers' => [
          {'id' => "service-a-id", 'node' => {'public_ip' => ""}, 'overlay_cidr' => nil}
        ]
      })
      expect {
        subject.run(['service-a'])
      }.to_not raise_error
    end
  end
end

Version data entries

69 entries across 69 versions & 1 rubygems

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