|
10 | 10 | it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.8.0/') }
|
11 | 11 | end
|
12 | 12 |
|
13 |
| - context 'when selecting jdk for Debian Buster (10.0)' do |
| 13 | + context 'on Debian Buster (10.0)' do |
14 | 14 | let(:facts) { { os: { family: 'Debian', name: 'Debian', lsb: { distcodename: 'buster' }, release: { major: '10' }, architecture: 'amd64' } } }
|
15 |
| - let(:params) { { 'distribution' => 'jdk' } } |
16 | 15 |
|
17 |
| - it { is_expected.to contain_package('java').with_name('openjdk-11-jdk') } |
18 |
| - it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64/') } |
19 |
| - end |
| 16 | + context 'when selecting jdk' do |
| 17 | + let(:params) { { 'distribution' => 'jdk' } } |
20 | 18 |
|
21 |
| - context 'when selecting jre for Debian Buster (10.0)' do |
22 |
| - let(:facts) { { os: { family: 'Debian', name: 'Debian', lsb: { distcodename: 'buster' }, release: { major: '10' }, architecture: 'amd64' } } } |
23 |
| - let(:params) { { 'distribution' => 'jre' } } |
| 19 | + it { is_expected.to contain_package('java').with_name('openjdk-11-jdk') } |
| 20 | + it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64/') } |
| 21 | + end |
| 22 | + |
| 23 | + context 'when selecting jre' do |
| 24 | + let(:params) { { 'distribution' => 'jre' } } |
24 | 25 |
|
25 |
| - it { is_expected.to contain_package('java').with_name('openjdk-11-jre-headless') } |
26 |
| - it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64/') } |
| 26 | + it { is_expected.to contain_package('java').with_name('openjdk-11-jre-headless') } |
| 27 | + it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64/') } |
| 28 | + end |
27 | 29 | end
|
28 | 30 |
|
29 |
| - context 'when selecting jdk for Ubuntu Bionic (18.04)' do |
| 31 | + context 'on Ubuntu Bionic (18.04)' do |
30 | 32 | let(:facts) { { os: { family: 'Debian', name: 'Ubuntu', lsb: { distcodename: 'bionic' }, release: { major: '18.04' }, architecture: 'amd64' } } }
|
31 |
| - let(:params) { { 'distribution' => 'jdk' } } |
32 | 33 |
|
33 |
| - it { is_expected.to contain_package('java').with_name('openjdk-11-jdk') } |
34 |
| - it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64/') } |
35 |
| - end |
| 34 | + context 'when selecting jdk' do |
| 35 | + let(:params) { { 'distribution' => 'jdk' } } |
36 | 36 |
|
37 |
| - context 'when selecting jre for Ubuntu Bionic (18.04)' do |
38 |
| - let(:facts) { { os: { family: 'Debian', name: 'Ubuntu', lsb: { distcodename: 'bionic' }, release: { major: '18.04' }, architecture: 'amd64' } } } |
39 |
| - let(:params) { { 'distribution' => 'jre' } } |
| 37 | + it { is_expected.to contain_package('java').with_name('openjdk-11-jdk') } |
| 38 | + it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64/') } |
| 39 | + end |
| 40 | + |
| 41 | + context 'when selecting jre' do |
| 42 | + let(:params) { { 'distribution' => 'jre' } } |
40 | 43 |
|
41 |
| - it { is_expected.to contain_package('java').with_name('openjdk-11-jre-headless') } |
42 |
| - it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64/') } |
| 44 | + it { is_expected.to contain_package('java').with_name('openjdk-11-jre-headless') } |
| 45 | + it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64/') } |
| 46 | + end |
43 | 47 | end
|
44 | 48 |
|
45 |
| - context 'when selecting openjdk for Oracle Linux' do |
| 49 | + context 'on Oracle Linux 7.0' do |
46 | 50 | let(:facts) { { os: { family: 'RedHat', name: 'OracleLinux', release: { full: '7.0' }, architecture: 'x86_64' } } }
|
47 | 51 |
|
48 |
| - it { is_expected.to contain_package('java').with_name('java-1.7.0-openjdk-devel') } |
49 |
| - end |
| 52 | + context 'when selecting openjdk' do |
| 53 | + it { is_expected.to contain_package('java').with_name('java-1.7.0-openjdk-devel') } |
| 54 | + end |
50 | 55 |
|
51 |
| - context 'when selecting passed value for Oracle Linux' do |
52 |
| - let(:facts) { { os: { family: 'RedHat', name: 'OracleLinux', release: { full: '7.0' }, architecture: 'x86_64' } } } |
53 |
| - let(:params) { { 'distribution' => 'jre' } } |
| 56 | + context 'when selecting passed value for Oracle Linux' do |
| 57 | + let(:params) { { 'distribution' => 'jre' } } |
54 | 58 |
|
55 |
| - it { is_expected.to contain_package('java').with_name('java-1.7.0-openjdk') } |
| 59 | + it { is_expected.to contain_package('java').with_name('java-1.7.0-openjdk') } |
| 60 | + end |
56 | 61 | end
|
57 | 62 |
|
58 | 63 | context 'when selecting passed value for Scientific Linux' do
|
|
0 commit comments