|
10 | 10 | it { is_expected.to contain_class('gluster::repo::apt') } |
11 | 11 | it { is_expected.to compile.with_all_deps } |
12 | 12 | it 'installs' do |
| 13 | + location = { |
| 14 | + 'Debian' => "https://download.gluster.org/pub/gluster/glusterfs/7/LATEST/Debian/#{facts[:lsbdistcodename]}/#{facts[:architecture]}/apt/", |
| 15 | + 'Ubuntu' => 'http://ppa.launchpad.net/gluster/glusterfs-7/ubuntu', |
| 16 | + } |
13 | 17 | is_expected.to contain_apt__source('glusterfs-LATEST').with( |
14 | 18 | repos: 'main', |
15 | 19 | release: facts[:lsbdistcodename].to_s, |
16 | | - location: "https://download.gluster.org/pub/gluster/glusterfs/7/LATEST/Debian/#{facts[:lsbdistcodename]}/#{facts[:architecture]}/apt/" |
| 20 | + location: location[facts[:os]['name']] |
17 | 21 | ) |
18 | 22 | end |
19 | 23 | end |
|
39 | 43 | end |
40 | 44 |
|
41 | 45 | it 'installs' do |
| 46 | + location = { |
| 47 | + 'Debian' => "https://download.gluster.org/pub/gluster/glusterfs/7/LATEST/Debian/#{facts[:lsbdistcodename]}/#{facts[:architecture]}/apt/", |
| 48 | + 'Ubuntu' => 'http://ppa.launchpad.net/gluster/glusterfs-7/ubuntu', |
| 49 | + } |
42 | 50 | is_expected.to contain_apt__source('glusterfs-LATEST').with( |
43 | 51 | repos: 'main', |
44 | 52 | release: facts[:lsbdistcodename].to_s, |
45 | | - location: "https://download.gluster.org/pub/gluster/glusterfs/7/LATEST/Debian/#{facts[:lsbdistcodename]}/#{facts[:architecture]}/apt/", |
| 53 | + location: location[facts[:os]['name']], |
46 | 54 | pin: '700' |
47 | 55 | ) |
48 | 56 | end |
|
56 | 64 | end |
57 | 65 |
|
58 | 66 | it 'installs' do |
| 67 | + location = { |
| 68 | + 'Debian' => "https://download.gluster.org/pub/gluster/glusterfs/4.1/LATEST/Debian/#{facts[:lsbdistcodename]}/amd64/apt/", |
| 69 | + 'Ubuntu' => 'http://ppa.launchpad.net/gluster/glusterfs-4.1/ubuntu', |
| 70 | + } |
| 71 | + key = { |
| 72 | + 'Debian' => { |
| 73 | + 'id' => 'EED3351AFD72E5437C050F0388F6CDEE78FA6D97', |
| 74 | + 'source' => 'https://download.gluster.org/pub/gluster/glusterfs/4.1/rsa.pub', |
| 75 | + }, |
| 76 | + 'Ubuntu' => { |
| 77 | + 'id' => 'F7C73FCC930AC9F83B387A5613E01B7B3FE869A9', |
| 78 | + 'source' => nil, |
| 79 | + }, |
| 80 | + } |
59 | 81 | is_expected.to contain_apt__source('glusterfs-LATEST').with( |
60 | 82 | repos: 'main', |
61 | 83 | release: facts[:lsbdistcodename].to_s, |
62 | | - key: { |
63 | | - 'id' => 'EED3351AFD72E5437C050F0388F6CDEE78FA6D97', |
64 | | - 'source' => 'https://download.gluster.org/pub/gluster/glusterfs/4.1/rsa.pub' |
65 | | - }, |
66 | | - location: "https://download.gluster.org/pub/gluster/glusterfs/4.1/LATEST/Debian/#{facts[:lsbdistcodename]}/amd64/apt/" |
| 84 | + key: key[facts[:os]['name']], |
| 85 | + location: location[facts[:os]['name']] |
67 | 86 | ) |
68 | 87 | end |
69 | 88 | end |
|
76 | 95 | end |
77 | 96 |
|
78 | 97 | it 'installs' do |
| 98 | + location = { |
| 99 | + 'Debian' => "https://download.gluster.org/pub/gluster/glusterfs/01.old-releases/3.12/LATEST/Debian/#{facts[:lsbdistcodename]}/amd64/apt/", |
| 100 | + 'Ubuntu' => 'http://ppa.launchpad.net/gluster/glusterfs-3.12/ubuntu', |
| 101 | + } |
| 102 | + key = { |
| 103 | + 'Debian' => { |
| 104 | + 'id' => '8B7C364430B66F0B084C0B0C55339A4C6A7BD8D4', |
| 105 | + 'source' => 'https://download.gluster.org/pub/gluster/glusterfs/3.12/rsa.pub', |
| 106 | + }, |
| 107 | + 'Ubuntu' => { |
| 108 | + 'id' => 'F7C73FCC930AC9F83B387A5613E01B7B3FE869A9', |
| 109 | + 'source' => nil, |
| 110 | + }, |
| 111 | + } |
79 | 112 | is_expected.to contain_apt__source('glusterfs-LATEST').with( |
80 | 113 | repos: 'main', |
81 | 114 | release: facts[:lsbdistcodename].to_s, |
82 | | - key: { |
83 | | - 'id' => '8B7C364430B66F0B084C0B0C55339A4C6A7BD8D4', |
84 | | - 'source' => 'https://download.gluster.org/pub/gluster/glusterfs/3.12/rsa.pub' |
85 | | - }, |
86 | | - location: "https://download.gluster.org/pub/gluster/glusterfs/01.old-releases/3.12/LATEST/Debian/#{facts[:lsbdistcodename]}/amd64/apt/" |
| 115 | + key: key[facts[:os]['name']], |
| 116 | + location: location[facts[:os]['name']] |
87 | 117 | ) |
88 | 118 | end |
89 | 119 | end |
|
0 commit comments