summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-06-14 01:25:44 +0000
committerGerrit Code Review <review@openstack.org>2017-06-14 01:25:44 +0000
commit8ba2b661ed948c371db996bdcc20a7cf194ffcba (patch)
treed13e1f5a8f670fb79261ffa16444adf88416feb2
parent4712d3db5e17d047547db0b127305148dd23a9ce (diff)
parent593e930d71c10022ed0edd7d6d940455c4868112 (diff)
Merge "Fix beaker on xenial"
-rw-r--r--manifests/init.pp8
-rwxr-xr-xspec/acceptance/basic_spec.rb11
-rw-r--r--spec/acceptance/fixtures/default.pp2
-rw-r--r--spec/acceptance/nodesets/nodepool-xenial.yml10
-rw-r--r--spec/spec_helper_acceptance.rb10
5 files changed, 28 insertions, 13 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 9b70287..a220594 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -28,6 +28,11 @@ class accessbot(
28 } 28 }
29 } 29 }
30 30
31 package { 'irc':
32 ensure => installed,
33 provider => openstack_pip,
34 }
35
31 exec { 'run_accessbot' : 36 exec { 'run_accessbot' :
32 command => '/usr/local/bin/accessbot -c /etc/accessbot/accessbot.config -l /etc/accessbot/channels.yaml >> /var/log/accessbot/accessbot.log 2>&1', 37 command => '/usr/local/bin/accessbot -c /etc/accessbot/accessbot.config -l /etc/accessbot/channels.yaml >> /var/log/accessbot/accessbot.log 2>&1',
33 path => '/usr/local/bin:/usr/bin:/bin/', 38 path => '/usr/local/bin:/usr/bin:/bin/',
@@ -36,7 +41,8 @@ class accessbot(
36 subscribe => File['/etc/accessbot/channels.yaml'], 41 subscribe => File['/etc/accessbot/channels.yaml'],
37 require => [File['/etc/accessbot/channels.yaml'], 42 require => [File['/etc/accessbot/channels.yaml'],
38 File['/etc/accessbot/accessbot.config'], 43 File['/etc/accessbot/accessbot.config'],
39 File['/usr/local/bin/accessbot']], 44 File['/usr/local/bin/accessbot'],
45 Package['irc']],
40 } 46 }
41 47
42 file { '/etc/accessbot': 48 file { '/etc/accessbot':
diff --git a/spec/acceptance/basic_spec.rb b/spec/acceptance/basic_spec.rb
index 8b96041..27ea995 100755
--- a/spec/acceptance/basic_spec.rb
+++ b/spec/acceptance/basic_spec.rb
@@ -33,16 +33,7 @@ describe 'basic accessbot' do
33 it { should be_file } 33 it { should be_file }
34 it { should be_owned_by 'root' } 34 it { should be_owned_by 'root' }
35 it { should be_mode 440 } 35 it { should be_mode 440 }
36 it { should be_grouped_into 'accessbo' } 36 it { should be_grouped_into 'accessbot' }
37 end
38
39 end
40
41 context 'main proccess' do
42
43 describe process("accessbot") do
44 its(:user) { should eq "accessbot" }
45 its(:args) { should match /-c accessbot.config/ }
46 end 37 end
47 38
48 end 39 end
diff --git a/spec/acceptance/fixtures/default.pp b/spec/acceptance/fixtures/default.pp
index 79ce4db..f0745a4 100644
--- a/spec/acceptance/fixtures/default.pp
+++ b/spec/acceptance/fixtures/default.pp
@@ -1,6 +1,6 @@
1file { '/etc/channels.yaml': 1file { '/etc/channels.yaml':
2 ensure => file, 2 ensure => file,
3 content => 'channels:\n - name: openstack-rainbow-unicorn-pals', 3 content => "access:\n nobody: +v\nglobal:\n nobody:\n - nobody\nchannels:\n - name: openstack-rainbow-unicorn-pals",
4} 4}
5 5
6class { '::accessbot': 6class { '::accessbot':
diff --git a/spec/acceptance/nodesets/nodepool-xenial.yml b/spec/acceptance/nodesets/nodepool-xenial.yml
new file mode 100644
index 0000000..99dd318
--- /dev/null
+++ b/spec/acceptance/nodesets/nodepool-xenial.yml
@@ -0,0 +1,10 @@
1HOSTS:
2 ubuntu-16.04-amd64:
3 roles:
4 - master
5 platform: ubuntu-16.04-amd64
6 hypervisor: none
7 ip: 127.0.0.1
8CONFIG:
9 type: foss
10 set_env: false
diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb
index 7a5efa1..de96291 100644
--- a/spec/spec_helper_acceptance.rb
+++ b/spec/spec_helper_acceptance.rb
@@ -2,7 +2,15 @@ require 'beaker-rspec'
2 2
3hosts.each do |host| 3hosts.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')
13
6 14
7 on host, "mkdir -p #{host['distmoduledir']}" 15 on host, "mkdir -p #{host['distmoduledir']}"
8end 16end