-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature 9 - Test Odoo 9 & 10 features (#13)
- Loading branch information
Showing
15 changed files
with
423 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
--- | ||
fixtures: | ||
symlinks: | ||
odoo9: "#{source_dir}" | ||
odoo: "#{source_dir}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# The baseline for module testing used by Puppet Labs is that each manifest | ||
# should have a corresponding test manifest that declares that class or defined | ||
# type. | ||
# | ||
# Tests are then run by using puppet apply --noop (to check for compilation | ||
# errors and view a log of events) or by fully applying the test in a virtual | ||
# environment (to compare the resulting system state to the desired state). | ||
# | ||
# Learn more about module testing here: | ||
# https://docs.puppet.com/guides/tests_smoke.html | ||
# | ||
class { 'postgresql::server': | ||
before => Class['odoo'] | ||
} | ||
|
||
class { '::odoo::repo10': | ||
before => Class['odoo'] | ||
} | ||
|
||
class { '::odoo': | ||
install_wkhtmltopdf => true, | ||
settings => { | ||
'options' => { | ||
'admin_passwd' => 'XXX_TOP_SECRET_XXX', | ||
'db_host' => 'False', | ||
'db_port' => 'False', | ||
'db_user' => 'odoo', | ||
'db_password' => 'False', | ||
'addons_path' => '/usr/lib/python2.7/dist-packages/odoo/addons', | ||
} | ||
}, | ||
version => present, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Install a repository to install an Odoo 10 package from. | ||
# | ||
# @param descr [string] A string to describe the repository. | ||
# @param key_id [string] The key for the Debian APT repository. This option | ||
# is ignored on the Red Hat family. | ||
# @param key_url [string] A URL to the key for the Debian APT repository. | ||
# This option is ignored on the Red Hat family. | ||
# @param pkg_url [string] The URL to a package. This defaults to | ||
# 'http://nightly.odoo.com/10.0/nightly/rpm/' on the Red | ||
# Hat family and 'http://nightly.odoo.com/9.0/nightly/deb/' on Debian. | ||
# @param release [string] The release for the Debian APT repository. This | ||
# option is ignored on the Red Hat family. | ||
# @param repos [string] The repos for the Debian APT repository. This option | ||
# is ignored on the Red Hat family. | ||
class odoo::repo10 ( | ||
$ensure = present, | ||
$descr = 'Odoo Nightly repository', | ||
$key_id = '5D134C924CB06330DCEFE2A1DEF2A2198183CBB5', | ||
$key_url = 'https://nightly.odoo.com/odoo.key', | ||
$pkg_url = undef, | ||
$release = './', | ||
$repos = '', | ||
) { | ||
case $::osfamily { | ||
'RedHat': { | ||
if $pkg_url != undef { | ||
$baseurl = $pkg_url | ||
} else { | ||
$baseurl = 'http://nightly.odoo.com/10.0/nightly/rpm/' | ||
} | ||
|
||
yumrepo { 'odoo': | ||
ensure => $ensure, | ||
descr => $descr, | ||
baseurl => $baseurl, | ||
enabled => 1, | ||
gpgcheck => 0, | ||
} | ||
} | ||
'Debian': { | ||
include apt | ||
include apt::update | ||
|
||
apt::key {'odookey': | ||
ensure => $ensure, | ||
id => $key_id, | ||
source => $key_url, | ||
before => Apt::Source['odoo'], | ||
} | ||
|
||
if $pkg_url != undef { | ||
$location = $pkg_url | ||
} else { | ||
$location = 'http://nightly.odoo.com/10.0/nightly/deb/' | ||
} | ||
|
||
apt::source {'odoo': | ||
ensure => $ensure, | ||
location => $location, | ||
comment => $descr, | ||
release => $release, | ||
repos => $repos, | ||
include => { | ||
'src' => false, | ||
}, | ||
notify => Exec['update-odoo-repos'], | ||
} | ||
|
||
# Required to wrap apt_update | ||
exec {'update-odoo-repos': | ||
refreshonly => true, | ||
command => '/bin/true', | ||
require => Exec['apt_update'], | ||
} | ||
} | ||
default: { | ||
warning("OS family ${::osfamily} not supported") | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.