|
3 | 3 | describe 'influxdb::install', :type => :class do |
4 | 4 |
|
5 | 5 | it { should create_class('influxdb::install') } |
6 | | - it { should contain_package('influxdb') } |
| 6 | + # it { should contain_package('influxdb') } |
7 | 7 |
|
8 | 8 | context 'installing from a repository' do |
9 | 9 | let(:pre_condition) { |
|
35 | 35 | )} |
36 | 36 | end |
37 | 37 | end |
| 38 | + |
| 39 | + context 'installing from web' do |
| 40 | + context 'with default preset url' do |
| 41 | + let(:pre_condition) { |
| 42 | + 'class{"influxdb": |
| 43 | + ensure => "installed", |
| 44 | + install_from_repository => false, |
| 45 | + }' |
| 46 | + } |
| 47 | + context 'on Debian' do |
| 48 | + let(:facts) { |
| 49 | + { |
| 50 | + :osfamily => 'Debian', |
| 51 | + :architecture => 'x86_64', |
| 52 | + } |
| 53 | + } |
| 54 | + it { should contain_exec('influxdb_wget') |
| 55 | + .with_command(/influxdb.s3.amazonaws/) |
| 56 | + } |
| 57 | + end |
| 58 | + context 'on redhat' do |
| 59 | + let(:facts) { |
| 60 | + { |
| 61 | + :osfamily => 'RedHat', |
| 62 | + :architecture => 'x86_64', |
| 63 | + } |
| 64 | + } |
| 65 | + context 'with default preset url' do |
| 66 | + it { should contain_exec('influxdb_rpm') |
| 67 | + .with_command(/influxdb.s3.amazonaws/) |
| 68 | + } |
| 69 | + end |
| 70 | + end |
| 71 | + end |
| 72 | + |
| 73 | + context 'with download_url set' do |
| 74 | + let(:pre_condition) { |
| 75 | + 'class{"influxdb": |
| 76 | + ensure => "installed", |
| 77 | + install_from_repository => false, |
| 78 | + download_url => "https://download.test.com/proxy/influxdb/influxdb-1.0.0.rpm" |
| 79 | + }' |
| 80 | + } |
| 81 | + context 'on Debian' do |
| 82 | + let(:facts) { |
| 83 | + { |
| 84 | + :osfamily => 'Debian', |
| 85 | + :architecture => 'x86_64', |
| 86 | + } |
| 87 | + } |
| 88 | + it { should contain_exec('influxdb_wget') |
| 89 | + .with_command(/download.test.com/) |
| 90 | + } |
| 91 | + end |
| 92 | + context 'on redhat' do |
| 93 | + let(:facts) { |
| 94 | + { |
| 95 | + :osfamily => 'RedHat', |
| 96 | + :architecture => 'x86_64', |
| 97 | + } |
| 98 | + } |
| 99 | + context 'with default preset url' do |
| 100 | + it { should contain_exec('influxdb_rpm') |
| 101 | + .with_command(/download.test.com/) |
| 102 | + } |
| 103 | + end |
| 104 | + end |
| 105 | + end |
| 106 | + end |
38 | 107 | end |
0 commit comments