Browse Source

Merge "Fix beaker on xenial"

Jenkins 1 year ago
parent
commit
8ba2b661ed

+ 7
- 1
manifests/init.pp View File

@@ -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 36
   exec { 'run_accessbot' :
32 37
     command     => '/usr/local/bin/accessbot -c /etc/accessbot/accessbot.config -l /etc/accessbot/channels.yaml >> /var/log/accessbot/accessbot.log 2>&1',
33 38
     path        => '/usr/local/bin:/usr/bin:/bin/',
@@ -36,7 +41,8 @@ class accessbot(
36 41
     subscribe   => File['/etc/accessbot/channels.yaml'],
37 42
     require     => [File['/etc/accessbot/channels.yaml'],
38 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 48
   file { '/etc/accessbot':

+ 1
- 10
spec/acceptance/basic_spec.rb View File

@@ -33,16 +33,7 @@ describe 'basic accessbot' do
33 33
         it { should be_file }
34 34
         it { should be_owned_by 'root' }
35 35
         it { should be_mode 440 }
36
-        it { should be_grouped_into 'accessbo' }
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/ }
36
+        it { should be_grouped_into 'accessbot' }
46 37
       end
47 38
 
48 39
     end

+ 1
- 1
spec/acceptance/fixtures/default.pp View File

@@ -1,6 +1,6 @@
1 1
 file { '/etc/channels.yaml':
2 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
 
6 6
 class { '::accessbot':

+ 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

+ 9
- 1
spec/spec_helper_acceptance.rb View File

@@ -2,7 +2,15 @@ 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')
13
+
6 14
 
7 15
   on host, "mkdir -p #{host['distmoduledir']}"
8 16
 end

Loading…
Cancel
Save