Sha256: 56293fa2bca88dd2744173546269d860aa007c044fd979f80bb663a08812c419

Contents?: true

Size: 1.84 KB

Versions: 24

Compression:

Stored size: 1.84 KB

Contents

When /^I run a recipe named "([^\"]*)" on server "([^\"]*)"\.$/ do |recipe, server_index|
  human_index = server_index.to_i - 1
  STDOUT.puts "#{recipe} -> root@#{@servers[human_index].dns_name}"
  @response = @servers[human_index].run_recipe(recipe)
end 

Then /I should successfully run a recipe named "(.*)"/ do |recipe|
  @server.run_recipe(recipe)
end 

Then /^I should run a recipe named "([^\"]*)" on server "([^\"]*)"\.$/ do |recipe, server_index|
  human_index = server_index.to_i - 1
  @servers[human_index].run_recipe(recipe)
end 

Then /^it should converge successfully\.$/ do
  @response[:status].should == true
end

When /^I clear the log on server "(.*)".$/ do |server_index|
  human_index = server_index.to_i - 1
  cmd = "rm -f /var/log/messages; touch /var/log/messages ; chown root:root /var/log/messages ; chmod 600 /var/log/messages"
  @response = @servers[human_index].spot_check(cmd) do |result|
    puts result
  end
end

Then /^I should see "(.*)" in the log on server "(.*)"\.$/ do |message, server_index|
  human_index = server_index.to_i - 1
  @servers[human_index].spot_check("grep '#{message}' /var/log/messages") do |result|
    result.should_not == nil
  end
end

Then /^the audit entry should NOT contain "([^\"]*)"\.$/ do |st_match|
  @response[:output].should_not include(st_match)
end

Then /^all servers should successfully run a recipe named "(.*)"\.$/ do |recipe|
   @servers.each do |s| 
     response = s.run_recipe(recipe)
     response[:status].should == true
   end
end

When /^I run a rightscript named "([^\"]*)" on server "([^\"]*)"\.$/ do |script, server_index|
  human_index = server_index.to_i - 1
  @status = @servers[human_index].run_executable(@scripts_to_run[script])
  @audit_link = @servers[human_index].audit_link
end

Then /^the rightscript should complete successfully\.$/ do
  @status.wait_for_completed(@audit_link)
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
rest_connection-0.1.7 examples/cucumber/step_definitions/recipe_steps.rb
rest_connection-0.1.6 examples/cucumber/step_definitions/recipe_steps.rb
rest_connection-0.1.5 examples/cucumber/step_definitions/recipe_steps.rb
rest_connection-0.1.4 examples/cucumber/step_definitions/recipe_steps.rb
rest_connection-0.1.3 examples/cucumber/step_definitions/recipe_steps.rb
rest_connection-0.1.2 examples/cucumber/step_definitions/recipe_steps.rb
rest_connection-0.1.1 examples/cucumber/step_definitions/recipe_steps.rb
rest_connection-0.1.0 examples/cucumber/step_definitions/recipe_steps.rb
rest_connection-0.0.23 examples/cucumber/step_definitions/recipe_steps.rb
rest_connection-0.0.22 examples/cucumber/step_definitions/recipe_steps.rb
rest_connection-0.0.21 examples/cucumber/step_definitions/recipe_steps.rb
rest_connection-0.0.20 examples/cucumber/step_definitions/recipe_steps.rb
rest_connection-0.0.19 examples/cucumber/step_definitions/recipe_steps.rb
rest_connection-0.0.18 examples/cucumber/step_definitions/recipe_steps.rb
rest_connection-0.0.17 examples/cucumber/step_definitions/recipe_steps.rb
rest_connection-0.0.16 examples/cucumber/step_definitions/recipe_steps.rb
rest_connection-0.0.15 examples/cucumber/step_definitions/recipe_steps.rb
rest_connection-0.0.14 examples/cucumber/step_definitions/recipe_steps.rb
rest_connection-0.0.13 examples/cucumber/step_definitions/recipe_steps.rb
rest_connection-0.0.12 examples/cucumber/step_definitions/recipe_steps.rb