Fixes and overrides

Change-Id: Id9e930655495e0ed42bf08f1089d90ab22453798
This commit is contained in:
Dmitry Ilyin 2016-02-11 23:47:56 +03:00
parent 06e2f0df24
commit 43a7f7b161
9 changed files with 63 additions and 3 deletions

View File

@ -126,6 +126,18 @@ possible run combinations you can use the **RUN:** annotation.::
It can be specified many times an all entered combinations will be added to the
list.
There is also a way to use the reverse logic. You can specify the Hiera
and facts yaml files that you want to exclude from the list instead of
providing the list of included files.::
# SKIP_HIERA: neut_vlan.compute.ssl neut_vlan.compute.nossl
# SKIP_FACTS: centos6
These yaml files will be excluded from the list of possible yaml files. If
you have used both include and exclude options, the exclude option will have
the priority over the include option. If there are no included Hiera files
the list of Hiera files will be generated from the node roles.
The final annotation **DISABLE_SPEC** allows you to temporarily disable the
spec from being seen the framework. It can use useful if you want to turn off
a spec with run problems and fix them later without breaking the tests.::

View File

@ -743,7 +743,8 @@ public_ssl:
hostname: public.fuel.local
horizon: true
services: true
cert_data: ''
cert_data:
content: 'somedataaboutyourkeypair'
cert_source: self_signed
metadata:
group: security

View File

@ -0,0 +1,12 @@
---
storage:
volume_backend_names:
volumes_ceph: false
volumes_lvm: 'LVM-backend'
volumes_block_device: false
storage_hash:
volume_backend_names:
volumes_ceph: false
volumes_lvm: 'LVM-backend'
volumes_block_device: false

View File

@ -1,4 +1,5 @@
---
host_uuid: '00000000-0000-0000-0000-000000000000'
configuration:
nova_config:
DEFAULT/debug:

View File

@ -176,9 +176,19 @@ module Noop
if line =~ /^\s*#\s*(?:yamls|hiera):\s*(.*)/
task_spec_metadata[:hiera] = get_list_of_yamls $1
end
if line =~ /^\s*#\s*facts:\s*(.*)/
task_spec_metadata[:facts] = get_list_of_yamls $1
end
if line =~ /^\s*#\s*(?:skip_yamls|skip_hiera):\s(.*)/
task_spec_metadata[:skip_hiera] = get_list_of_yamls $1
end
if line =~ /^\s*#\s*skip_facts:\s(.*)/
task_spec_metadata[:skip_facts] = get_list_of_yamls $1
end
if line =~ /disable_spec/
task_spec_metadata[:disable] = true
end
@ -216,8 +226,11 @@ module Noop
metadata = spec_run_metadata.fetch file_name_spec, {}
metadata[:facts] = [Noop::Config.default_facts_file_name] unless metadata[:facts]
metadata[:hiera] = assign_spec_to_hiera.fetch file_name_spec, [] unless metadata[:hiera]
runs = []
metadata[:facts].product metadata[:hiera] do |facts, hiera|
next if metadata[:skip_hiera].is_a? Array and metadata[:skip_hiera].include? hiera
next if metadata[:skip_facts].is_a? Array and metadata[:skip_facts].include? hiera
run_record = {
:hiera => hiera,
:facts => facts,

View File

@ -130,10 +130,23 @@ module Noop
end.max
end
def output_task_totals
tasks = 0
failed = 0
pending = 0
task_list.each do |task|
pending += 1 if task.pending?
failed += 1 if task.failed?
tasks += 1
end
output "Tasks: #{tasks} Failed: #{failed} Pending: #{pending}"
end
def task_report
task_list.each do |task|
output_task_status task
end
output_task_totals
end
def show_filters

View File

@ -119,7 +119,7 @@ module Noop
end
# @return [Object]
def hiera_structure(key, default = nil, separator = '/', resolution_type = :priority)
def hiera_structure(key, default = nil, separator = '/', resolution_type = :hash)
path_lookup = lambda do |data, path, default_value|
break default_value unless data
break data unless path.is_a? Array and path.any?

View File

@ -24,7 +24,13 @@ module Noop
end
class << Hiera::Config
attr_accessor :config
def config
@config
end
def config=(value)
@config = value
end
def load(source)
@config ||= {}

View File

@ -28,3 +28,5 @@ RSpec.configure do |c|
end
end
Noop.setup_overrides