3 describe 'archive::artifactory' do
4 let(:facts) { { os: { family: 'RedHat' }, puppetversion: '4.4.0' } }
7 MockFunction.new('artifactory_sha1') do |f|
8 f.stub.returns('0d4f4b4b039c10917cfc49f6f6be71e4')
12 context 'artifactory archive with defaults' do
13 let(:title) { '/opt/app/example.zip' }
16 url: 'http://home.lan:8081/artifactory/path/example.zip'
21 is_expected.to contain_archive('/opt/app/example.zip').with(
22 path: '/opt/app/example.zip',
23 source: 'http://home.lan:8081/artifactory/path/example.zip',
24 checksum: '0d4f4b4b039c10917cfc49f6f6be71e4',
30 is_expected.to contain_file('/opt/app/example.zip').with(
34 require: 'Archive[/opt/app/example.zip]'
39 context 'artifactory archive with path' do
40 let(:title) { 'example.zip' }
43 archive_path: '/opt/app',
44 url: 'http://home.lan:8081/artifactory/path/example.zip',
52 is_expected.to contain_archive('/opt/app/example.zip').with(
53 path: '/opt/app/example.zip',
54 source: 'http://home.lan:8081/artifactory/path/example.zip',
55 checksum: '0d4f4b4b039c10917cfc49f6f6be71e4',
61 is_expected.to contain_file('/opt/app/example.zip').with(
65 require: 'Archive[/opt/app/example.zip]'