Fix beaker-rspec tests
The puppet-openstackci beaker tests have been failing for all the puppet modules since they began running on Ubuntu Xenial nodes. This was because there was no Xenial-specific nodeset file for beaker to run and it was simply failing upon being unable to find the file. This patch adds the ubuntu-xenial nodeset. Further, it forgoes the install_puppet function because it attempts to install puppet 3 from the puppetlabs apt repo, which does not support Xenial. Because we're no longer using the install_puppet function, we also need to set default values for the host object so that we can access things like host['distmoduledir']. Finally, we add the libffi-dev package since the keyring pip package requires it to build and it does not seem to be in our Xenial images. Change-Id: I8cc44e78116d6a7c8406e6c03756acb63c70834f
This commit is contained in:
		@@ -115,10 +115,16 @@ class openstackci::logserver (
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if ! defined(Package['libffi-dev']) {
 | 
			
		||||
    package { 'libffi-dev':
 | 
			
		||||
      ensure => 'present',
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  package { 'keyring':
 | 
			
		||||
    ensure   => 'latest',
 | 
			
		||||
    provider => 'openstack_pip',
 | 
			
		||||
    require  => [Package['libdbus-1-dev'], Package['libdbus-glib-1-dev'], Package['build-essential'], Package['python-dev']],
 | 
			
		||||
    require  => [Package['libdbus-1-dev'], Package['libdbus-glib-1-dev'], Package['build-essential'], Package['python-dev'], Package['libffi-dev']],
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  vcsrepo { '/opt/os-loganalyze':
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										10
									
								
								spec/acceptance/nodesets/nodepool-xenial.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								spec/acceptance/nodesets/nodepool-xenial.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
			
		||||
HOSTS:
 | 
			
		||||
  ubuntu-16.04-amd64:
 | 
			
		||||
    roles:
 | 
			
		||||
      - master
 | 
			
		||||
    platform: ubuntu-16.04-amd64
 | 
			
		||||
    hypervisor: none
 | 
			
		||||
    ip: 127.0.0.1
 | 
			
		||||
CONFIG:
 | 
			
		||||
  type: foss
 | 
			
		||||
  set_env: false
 | 
			
		||||
@@ -2,7 +2,10 @@ require 'beaker-rspec'
 | 
			
		||||
 | 
			
		||||
hosts.each do |host|
 | 
			
		||||
 | 
			
		||||
  install_puppet
 | 
			
		||||
  # puppet 3 isn't available from apt.puppetlabs.com so install it from the Xenial repos
 | 
			
		||||
  on host, "which apt-get && apt-get install puppet -y", { :acceptable_exit_codes => [0,1] }
 | 
			
		||||
  on host, "which yum && yum install puppet -y", { :acceptable_exit_codes => [0,1] }
 | 
			
		||||
  add_platform_foss_defaults(host, 'unix')
 | 
			
		||||
 | 
			
		||||
  on host, "mkdir -p #{host['distmoduledir']}"
 | 
			
		||||
end
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user