Sha256: 8d1beabc3fb81a061ec2496f62c9570961bd037e7e3b09c6abf341f5339eaf36

Contents?: true

Size: 1.35 KB

Versions: 11

Compression:

Stored size: 1.35 KB

Contents

Then /^I reset the command list/ do
  aruba.command_monitor.clear
end

When /^the command completes successfully/ do
  last_command_started.wait
  last_command_started.terminate
  expect(last_command_started.exit_status).to eq(0)
end

Then /^I send the audit event:/ do |event|
  event = event.gsub('$ns',@namespace)
  step "I run `env RESTCLIENT_LOG=stderr conjur audit send` interactively"
  last_command_started.write event
  last_command_started.close_io :stdin
  step "the command completes successfully"
end

# this is step copypasted from https://github.com/cucumber/aruba/blob/master/lib/aruba/cucumber.rb#L24 
# original has typo in regexp, which is fixed here
Given(/^a file named "([^"]*?)" with: '(.*?)'$/) do |file_name, file_content|
  file_content.gsub!('$ns',@namespace)
  write_file(file_name, file_content)
end

Given(/^a file named "([^"]*?)" with namespace substitution:$/) do |file_name, file_content|
  step "a file named \"#{file_name}\" with:", file_content.gsub('$ns',@namespace)
end

Then /^it prints the path to temporary file which contains: '(.*)'$/ do |content|
  filename = last_command_started.stdout.strip
  tempfiles << filename
  actual_content = File.read(filename)
  expect(actual_content).to match(content)
end

Then /^the output from "([^"]*)" should match \/([^\/]*)\/$/ do |cmd, expected|
  assert_matching_output(expected, output_from(cmd))
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
conjur-cli-5.2.5 acceptance-features/step_definitions/cli_steps.rb
conjur-cli-5.2.4 acceptance-features/step_definitions/cli_steps.rb
conjur-cli-5.2.3 acceptance-features/step_definitions/cli_steps.rb
conjur-cli-5.2.1 acceptance-features/step_definitions/cli_steps.rb
conjur-cli-5.2.0 acceptance-features/step_definitions/cli_steps.rb
conjur-cli-5.1.2 acceptance-features/step_definitions/cli_steps.rb
conjur-cli-5.1.1 acceptance-features/step_definitions/cli_steps.rb
conjur-cli-5.1.0 acceptance-features/step_definitions/cli_steps.rb
conjur-cli-4.30.1 acceptance-features/step_definitions/cli_steps.rb
conjur-cli-4.30.0 acceptance-features/step_definitions/cli_steps.rb
conjur-cli-4.29.0 acceptance-features/step_definitions/cli_steps.rb