acceptance/lib/pxp-agent/bolt_pxp_module_helper.rb
# Checks that a non-blocking request finished successfully.
# Block is executed on the stdout string.
Checks that a non-blocking request finished successfully.
Block is executed on the stdout string.
Checks that a non - blocking request finished successfully . Block is executed on the stdout string .
def ensure_successful(broker, targets, response_dataset, max_retries: 30, query_interval: 1)
  transaction_ids = response_dataset.map { |data| data['transaction_id'] }
  agent_identities(targets).zip(transaction_ids).map do |identity, transaction_id|
    check_non_blocking_response(broker, identity, transaction_id, max_retries, query_interval) do |result|
      assert_equal('success', result['status'], 'Action was expected to succeed')
      assert_nil(result['stderr'], 'Successful action expected to have no output on stderr')
      assert_equal(0, result['exitcode'], 'Successful action expected to have exit code 0')
      yield result['stdout'] if block_given?
    end
  end
end
def ensure_successful ( broker , targets , response_dataset , max_retries : 30 , query_interval : 1 ) transaction_ids = response_dataset . map { | data | data [ 'transaction_id' ] } agent_identities ( targets ) . zip ( transaction_ids ) . map do | identity , transaction_id | check_non_blocking_response ( broker , identity , transaction_id , max_retries , query_interval ) do | result | assert_equal ( 'success' , result [ 'status' ] , 'Action was expected to succeed' ) assert_nil ( result [ 'stderr' ] , 'Successful action expected to have no output on stderr' ) assert_equal ( 0 , result [ 'exitcode' ] , 'Successful action expected to have exit code 0' ) yield result [ 'stdout' ] if block_given? end end end
Checks that a non-blocking request finished successfully.
Checks that a non - blocking request finished successfully .
broker
<not_specific>
targets
<not_specific>
response_dataset
<not_specific>
max_retries
<not_specific>
query_interval
<not_specific>