
The idempotency checks race external changes like updates to project-config or nodepool. This often causes this job to fail when we are busy updating other parts of our sytems. Idempotency is nice but not necessary. Lets remove these checks to make testing more reliable. Change-Id: I1092b3a2f4b781465c2148336076677d3c07211e
48 lines
1.2 KiB
Ruby
Executable File
48 lines
1.2 KiB
Ruby
Executable File
require 'puppet-openstack_infra_spec_helper/spec_helper_acceptance'
|
|
|
|
describe 'nodepool builder', :if => (
|
|
['debian', 'ubuntu'].include?(os[:family]) &&
|
|
# builder is not expected to work with python < 3.5 since its config
|
|
# depends on math.inf
|
|
os[:release] >= '16.04'
|
|
) do
|
|
|
|
def pp_path
|
|
base_path = File.dirname(__FILE__)
|
|
File.join(base_path, 'fixtures', 'nodepool')
|
|
end
|
|
|
|
def preconditions_puppet_manifest
|
|
module_path = File.join(pp_path, 'builder-preconditions.pp')
|
|
File.read(module_path)
|
|
end
|
|
|
|
def postconditions_puppet_manifest
|
|
module_path = File.join(pp_path, 'builder-postconditions.pp')
|
|
File.read(module_path)
|
|
end
|
|
|
|
before(:all) do
|
|
apply_manifest(preconditions_puppet_manifest, catch_failures: true)
|
|
end
|
|
|
|
def puppet_manifest
|
|
module_path = File.join(pp_path, 'builder.pp')
|
|
File.read(module_path)
|
|
end
|
|
|
|
it 'should work with no errors' do
|
|
apply_manifest(puppet_manifest, catch_failures: true)
|
|
end
|
|
|
|
it 'should start' do
|
|
apply_manifest(postconditions_puppet_manifest, catch_failures: true)
|
|
end
|
|
|
|
describe command("systemctl status nodepool-builder") do
|
|
its(:stdout) { should contain('Active: active') }
|
|
its(:stdout) { should_not contain('dead') }
|
|
end
|
|
|
|
end
|