Skip to content

Commit

Permalink
Merge pull request #172 from beergeek/hash_checking
Browse files Browse the repository at this point in the history
Check Node/Classes hashes
  • Loading branch information
dylanratcliffe authored May 13, 2018
2 parents c902b4f + 8b95b2a commit 3146e90
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/onceover/testconfig.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,13 @@ def self.subtractive_to_list(subtractive_hash)
# { 'include' => 'somegroup'
# 'exclude' => 'other'}
# and return a list of classes/nodes
include_list = Onceover::TestConfig.find_list(subtractive_hash['include']).flatten
exclude_list = Onceover::TestConfig.find_list(subtractive_hash['exclude']).flatten
include_list - exclude_list
if subtractive_hash.has_key?('include') && subtractive_hash.has_key?('exclude')
include_list = Onceover::TestConfig.find_list(subtractive_hash['include']).flatten
exclude_list = Onceover::TestConfig.find_list(subtractive_hash['exclude']).flatten
include_list - exclude_list
else
raise "The classes/nodes hash must have an `exclude` if using an `include`"
end
end

def verify_spec_test(controlrepo, test)
Expand Down

0 comments on commit 3146e90

Please sign in to comment.