Sha256: 971a3801bac0e147799eab4ec55f892b05a6d95d0f8ce7f5dd7d3e6b08e1a4ee

Contents?: true

Size: 771 Bytes

Versions: 34

Compression:

Stored size: 771 Bytes

Contents

require_relative "../../../spec_helper"
require "kontena/cli/stacks/deploy_command"

describe Kontena::Cli::Stacks::DeployCommand do

  include ClientHelpers

  describe '#execute' do
    before(:each) do
      allow(subject).to receive(:wait_for_deploy_to_finish).and_return(spy)
    end

    it 'requires api url' do
      expect(described_class.requires_current_master?).to be_truthy
      subject.run(['test-stack'])
    end

    it 'requires token' do
      expect(described_class.requires_current_master_token?).to be_truthy
      subject.run(['test-stack'])
    end

    it 'sends deploy command to master' do
      expect(client).to receive(:post).with(
        'stacks/test-grid/test-stack/deploy', {}
      )
      subject.run(['test-stack'])
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
kontena-cli-1.1.6 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.1.5 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.1.5.rc3 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.1.5.rc2 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.1.5.rc1 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.1.4 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.1.3 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.1.2 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.1.2.rc2 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.1.2.rc1 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.1.1 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.1.1.rc1 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.1.0 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.1.0.rc2 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.1.0.rc1 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.1.0.pre1 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.0.6 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.0.6.rc1 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.0.5 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.0.5.rc1 spec/kontena/cli/stacks/deploy_command_spec.rb