Skip to content

Commit 8b3fcf5

Browse files
committed
Simplify / Fix test matrix
1 parent 0eba318 commit 8b3fcf5

File tree

1 file changed

+28
-30
lines changed

1 file changed

+28
-30
lines changed

spec/acceptance/odoo_spec.rb

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,46 +16,44 @@ def odoo_supported_versions
1616
end
1717

1818
describe 'odoo class' do
19-
['10.0', '11.0', '12.0', '13.0'].each do |version|
19+
odoo_supported_versions.each do |version|
2020
context "when using odoo #{version}" do
2121
let(:version) { version }
2222

23-
if odoo_supported_versions.include?(version)
24-
it 'works idempotently with no errors' do
25-
# FIXME: We should not tweak anything here, the odoo class should be self-contained
26-
pp = <<~MANIFEST
27-
if $facts.get('os.name') == 'debian' {
28-
class { 'apt::backports':
29-
}
23+
it 'works idempotently with no errors' do
24+
# FIXME: We should not tweak anything here, the odoo class should be self-contained
25+
pp = <<~MANIFEST
26+
if $facts.get('os.name') == 'debian' {
27+
class { 'apt::backports':
3028
}
31-
if $facts.get('os.name') == 'ubuntu' {
32-
apt::source { 'ubuntu-universe':
33-
location => 'http://archive.ubuntu.com/ubuntu',
34-
repos => 'universe',
35-
}
29+
}
30+
if $facts.get('os.name') == 'ubuntu' {
31+
apt::source { 'ubuntu-universe':
32+
location => 'http://archive.ubuntu.com/ubuntu',
33+
repos => 'universe',
3634
}
35+
}
3736
38-
if '#{version}' == '10.0' {
39-
package { 'python-pip':
40-
ensure => installed,
41-
}
42-
} else {
43-
package { 'python3-pip':
44-
ensure => installed,
45-
}
37+
if '#{version}' == '10.0' {
38+
package { 'python-pip':
39+
ensure => installed,
4640
}
47-
48-
class { 'odoo':
49-
version => '#{version}'
41+
} else {
42+
package { 'python3-pip':
43+
ensure => installed,
5044
}
45+
}
46+
47+
class { 'odoo':
48+
version => '#{version}'
49+
}
5150
52-
Class['apt::update']
53-
-> Class['odoo::dependencies']
54-
MANIFEST
51+
Class['apt::update']
52+
-> Class['odoo::dependencies']
53+
MANIFEST
5554

56-
apply_manifest(pp, catch_failures: true)
57-
apply_manifest(pp, catch_changes: true)
58-
end
55+
apply_manifest(pp, catch_failures: true)
56+
apply_manifest(pp, catch_changes: true)
5957
end
6058
end
6159
end

0 commit comments

Comments
 (0)