Sha256: ebcb03217c1ad2a88a14313acbb080684ce4372a9e68403f9519a481638590a6

Contents?: true

Size: 747 Bytes

Versions: 32

Compression:

Stored size: 747 Bytes

Contents

require "kontena/cli/stacks/deploy_command"

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

  include ClientHelpers
  include RequirementsHelper

  expect_to_require_current_master
  expect_to_require_current_master_token

  mock_current_master

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

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

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
kontena-cli-1.3.5 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.3.5.rc1 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.3.4 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.3.4.rc1 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.3.3 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.3.3.rc1 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.3.2 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.3.2.rc2 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.3.2.rc1 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.3.1 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.3.1.rc2 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.3.1.rc1 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.3.0 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.3.0.rc4 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.3.0.rc3 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.3.0.rc2 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.3.0.rc1 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.3.0.pre2 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.3.0.pre1 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.2.2 spec/kontena/cli/stacks/deploy_command_spec.rb