Sha256: 8794027d33f8779301fc99ea6ae8a3df899db6a3e37eb9b4ed281298fc7b60a4

Contents?: true

Size: 1.37 KB

Versions: 20

Compression:

Stored size: 1.37 KB

Contents

require 'spec_helper'
require 'dpl/provider/cloud_foundry'

describe DPL::Provider::CloudFoundry do
  subject :provider do
    described_class.new(DummyContext.new, api: 'api.run.awesome.io', username: 'mallomar',
                        password: 'myreallyawesomepassword',
                        organization: 'myorg',
                        space: 'outer')
  end

  describe :check_auth do
    example do
      expect(provider.context).to receive(:shell).with('wget http://go-cli.s3-website-us-east-1.amazonaws.com/releases/latest/cf-cli_amd64.deb -qO temp.deb && sudo dpkg -i temp.deb')
      expect(provider.context).to receive(:shell).with('rm temp.deb')
      expect(provider.context).to receive(:shell).with('cf api api.run.awesome.io')
      expect(provider.context).to receive(:shell).with('cf login --u mallomar --p myreallyawesomepassword --o myorg --s outer')
      provider.check_auth
    end
  end

  describe :check_app do
    example do
      expect{provider.check_app}.to raise_error('Application must have a manifest.yml for unattended deployment')
    end
  end

  describe :needs_key? do
    example do
      expect(provider.needs_key?).to eq(false)
    end
  end

  describe :push_app do
    example do
      expect(provider.context).to receive(:shell).with('cf push')
      expect(provider.context).to receive(:shell).with('cf logout')
      provider.push_app

    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
dpl-1.6.1.travis.447.1 spec/provider/cloudfoundry_spec.rb
dpl-1.6.0 spec/provider/cloudfoundry_spec.rb
dpl-1.5.11.travis.445.1 spec/provider/cloudfoundry_spec.rb
dpl-1.5.11.travis.437.1 spec/provider/cloudfoundry_spec.rb
dpl-1.5.11.travis.436.1 spec/provider/cloudfoundry_spec.rb
dpl-1.5.11.travis.435.1 spec/provider/cloudfoundry_spec.rb
dpl-1.5.11.travis.432.1 spec/provider/cloudfoundry_spec.rb
dpl-1.5.11.travis.430.1 spec/provider/cloudfoundry_spec.rb
dpl-1.5.11.travis.414.1 spec/provider/cloudfoundry_spec.rb
dpl-1.5.10 spec/provider/cloudfoundry_spec.rb
dpl-1.5.10.travis.413.1 spec/provider/cloudfoundry_spec.rb
dpl-1.5.10.travis.402.1 spec/provider/cloudfoundry_spec.rb
dpl-1.6.0.travis.399.1 spec/provider/cloudfoundry_spec.rb
dpl-1.5.9 spec/provider/cloudfoundry_spec.rb
dpl-1.5.9.travis.397.1 spec/provider/cloudfoundry_spec.rb
dpl-1.5.9.travis.394.1 spec/provider/cloudfoundry_spec.rb
dpl-1.5.9.travis.393.1 spec/provider/cloudfoundry_spec.rb
dpl-1.5.9.travis.390.1 spec/provider/cloudfoundry_spec.rb
dpl-1.5.9.travis.373.1 spec/provider/cloudfoundry_spec.rb
dpl-1.5.9.travis.372.1 spec/provider/cloudfoundry_spec.rb