github.com/Venafi/vcert/v5@v5.10.2/aruba/features/config/step_definitions/my_steps.rb (about)

     1  
     2  
     3  When(/^I have file named "([^"]*)" with (\S+) connection details$/) do |fname, endpoint|
     4  
     5    steps %{
     6            Then a file named "#{fname}" with:
     7            """
     8            #{ENDPOINT_CONFIGS[endpoint]}
     9            """
    10          }
    11  end
    12  
    13  When(/^I have file named "([^"]*)" with all endpoints connection details$/) do |fname|
    14  
    15    steps %{
    16            Then a file named "#{fname}" with:
    17            """
    18            #{ALL_ENDPOINTS_CONFIG}
    19            """
    20          }
    21  end
    22  
    23  When(/^I enroll random certificate \-config "([^"]*)" \-profile (.*) with (.+)?$/) do |config, profile, flags|
    24    cn = " -cn " + random_cn
    25    cmd = "vcert enroll -config #{config} -profile #{profile} #{cn} #{flags}"
    26  
    27    steps %{Then I try to run `#{cmd}`}
    28  end