Browse Source

Fix beaker on xenial

Add a xenial nodeset and update the spec helper to install puppet 3 from
the Ubuntu repos instead of from puppetlabs. Also fix linter errors.

Change-Id: Iae66db33213aadcaad76879e0fe9b40db4e65f86
changes/30/477130/2
Colleen Murphy 1 year ago
parent
commit
bed93f260a

+ 2
- 2
manifests/init.pp View File

@@ -18,12 +18,12 @@
18 18
 #
19 19
 class phabricator (
20 20
   # Database Configurations.
21
+  $mysql_user_password,
22
+  $mysql_root_password,
21 23
   $mysql_database          = 'phabricator',
22 24
   $mysql_host              = 'localhost',
23 25
   $mysql_port              = 3306,
24 26
   $mysql_user              = 'phabricator',
25
-  $mysql_user_password,
26
-  $mysql_root_password,
27 27
 
28 28
   # Phabricator working directory
29 29
   $phabricator_dir         = '/opt/phabricator',

+ 2
- 2
manifests/vars.pp View File

@@ -19,12 +19,12 @@
19 19
 #
20 20
 class phabricator::vars (
21 21
   # Database Configurations.
22
+  $mysql_user_password,
23
+  $mysql_root_password,
22 24
   $mysql_database          = 'phabricator',
23 25
   $mysql_host              = 'localhost',
24 26
   $mysql_port              = 3306,
25 27
   $mysql_user              = 'phabricator',
26
-  $mysql_user_password,
27
-  $mysql_root_password,
28 28
 
29 29
   # Phabricator working directory
30 30
   $phabricator_dir        = '/opt/phabricator',

+ 10
- 0
spec/acceptance/nodesets/nodepool-xenial.yml View File

@@ -0,0 +1,10 @@
1
+HOSTS:
2
+  ubuntu-16.04-amd64:
3
+    roles:
4
+      - master
5
+    platform: ubuntu-16.04-amd64
6
+    hypervisor: none
7
+    ip: 127.0.0.1
8
+CONFIG:
9
+  type: foss
10
+  set_env: false

+ 8
- 1
spec/spec_helper_acceptance.rb View File

@@ -2,7 +2,14 @@ require 'beaker-rspec'
2 2
 
3 3
 hosts.each do |host|
4 4
 
5
-  install_puppet
5
+  # puppet 3 isn't available from apt.puppetlabs.com so install it from the Xenial repos
6
+  on host, "which apt-get && apt-get install puppet -y", { :acceptable_exit_codes => [0,1] }
7
+  # otherwise use the beaker helpers to install the yum.puppetlabs.com repo and puppet
8
+  r = on host, "which yum",  { :acceptable_exit_codes => [0,1] }
9
+  if r.exit_code == 0
10
+    install_puppet
11
+  end
12
+  add_platform_foss_defaults(host, 'unix')
6 13
 
7 14
   on host, "mkdir -p #{host['distmoduledir']}"
8 15
 end

Loading…
Cancel
Save