Sha256: edff726f1ac0f25777187bce587ec127a877608355a7e84d92acb104ddd9b605
Contents?: true
Size: 1.08 KB
Versions: 1
Compression:
Stored size: 1.08 KB
Contents
require 'json' When /^I create a vault item '(.+)\/(.+)' containing the JSON '(.+)' encrypted for '(.+)'$/ do |vault, item, json, nodelist| write_file 'item.json', json query = nodelist.split(/,/).map{|e| "name:#{e}"}.join(' OR ') run_simple "knife vault create #{vault} #{item} -z -c knife.rb -A admin -S '#{query}' -J item.json" end When /^I update the vault item '(.+)\/(.+)' to be encrypted for '(.+)'( with the clean option)?$/ do |vault, item, nodelist, cleanopt| query = nodelist.split(/,/).map{|e| "name:#{e}"}.join(' OR ') run_simple "knife vault update #{vault} #{item} -S '#{query}' #{cleanopt ? '--clean' : ''}" end Then /^the vault item '(.+)\/(.+)' should( not)? be encrypted for '(.+)'$/ do |vault, item, neg, nodelist| nodes = nodelist.split(/,/) run_simple("knife vault show #{vault} #{item} -z -c knife.rb -p clients -F json") output = output_from("knife vault show #{vault} #{item} -z -c knife.rb -p clients -F json") nodes.each do |node| if neg assert_no_partial_output(node, output) else assert_partial_output(node, output) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
chef-vault-2.3.0 | features/step_definitions/chef-vault.rb |