|
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 |
30 |
| - let(:facts) { { os: { family: 'Debian', name: 'Ubuntu', lsb: { distcodename: 'bionic' }, release: { major: '18.04' }, architecture: 'amd64' } } } |
31 |
| - let(:params) { { 'distribution' => 'jdk' } } |
| 31 | + context 'on Debian Bookworm (12)' do |
| 32 | + let(:facts) { { os: { family: 'Debian', name: 'Debian', lsb: { distcodename: 'bookworm' }, release: { major: '12' }, architecture: 'amd64' } } } |
| 33 | + |
| 34 | + context 'when selecting jdk' do |
| 35 | + let(:params) { { 'distribution' => 'jdk' } } |
| 36 | + |
| 37 | + it { is_expected.to contain_package('java').with_name('openjdk-17-jdk') } |
| 38 | + it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.17.0-openjdk-amd64/') } |
| 39 | + end |
| 40 | + |
| 41 | + context 'when selecting jre' do |
| 42 | + let(:params) { { 'distribution' => 'jre' } } |
32 | 43 |
|
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/') } |
| 44 | + it { is_expected.to contain_package('java').with_name('openjdk-17-jre-headless') } |
| 45 | + it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.17.0-openjdk-amd64/') } |
| 46 | + end |
35 | 47 | end
|
36 | 48 |
|
37 |
| - context 'when selecting jre for Ubuntu Bionic (18.04)' do |
| 49 | + context 'on Ubuntu Bionic (18.04)' do |
38 | 50 | let(:facts) { { os: { family: 'Debian', name: 'Ubuntu', lsb: { distcodename: 'bionic' }, release: { major: '18.04' }, architecture: 'amd64' } } }
|
39 |
| - let(:params) { { 'distribution' => 'jre' } } |
40 | 51 |
|
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/') } |
43 |
| - end |
| 52 | + context 'when selecting jdk' do |
| 53 | + let(:params) { { 'distribution' => 'jdk' } } |
44 | 54 |
|
45 |
| - context 'when selecting openjdk for Oracle Linux' do |
46 |
| - let(:facts) { { os: { family: 'RedHat', name: 'OracleLinux', release: { full: '7.0' }, architecture: 'x86_64' } } } |
| 55 | + it { is_expected.to contain_package('java').with_name('openjdk-11-jdk') } |
| 56 | + it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64/') } |
| 57 | + end |
| 58 | + |
| 59 | + context 'when selecting jre' do |
| 60 | + let(:params) { { 'distribution' => 'jre' } } |
47 | 61 |
|
48 |
| - it { is_expected.to contain_package('java').with_name('java-1.7.0-openjdk-devel') } |
| 62 | + it { is_expected.to contain_package('java').with_name('openjdk-11-jre-headless') } |
| 63 | + it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64/') } |
| 64 | + end |
49 | 65 | end
|
50 | 66 |
|
51 |
| - context 'when selecting passed value for Oracle Linux' do |
| 67 | + context 'on Oracle Linux 7.0' do |
52 | 68 | let(:facts) { { os: { family: 'RedHat', name: 'OracleLinux', release: { full: '7.0' }, architecture: 'x86_64' } } }
|
53 |
| - let(:params) { { 'distribution' => 'jre' } } |
54 | 69 |
|
55 |
| - it { is_expected.to contain_package('java').with_name('java-1.7.0-openjdk') } |
| 70 | + context 'when selecting openjdk' do |
| 71 | + it { is_expected.to contain_package('java').with_name('java-1.7.0-openjdk-devel') } |
| 72 | + end |
| 73 | + |
| 74 | + context 'when selecting passed value for Oracle Linux' do |
| 75 | + let(:params) { { 'distribution' => 'jre' } } |
| 76 | + |
| 77 | + it { is_expected.to contain_package('java').with_name('java-1.7.0-openjdk') } |
| 78 | + end |
56 | 79 | end
|
57 | 80 |
|
58 | 81 | context 'when selecting passed value for Scientific Linux' do
|
|
0 commit comments