Class: Dragnet::Verifiers::ResultVerifier

Inherits:
Verifier
  • Object
show all
Defined in:
lib/dragnet/verifiers/result_verifier.rb

Overview

Verifies the result field on the given MTR record.

Instance Attribute Summary

Attributes inherited from Verifier

#test_record

Instance Method Summary collapse

Methods inherited from Verifier

#initialize

Methods included from Helpers::RepositoryHelper

#relative_to_repo, #repo_base, #shorten_sha1

Constructor Details

This class inherits a constructor from Dragnet::Verifiers::Verifier

Instance Method Details

#verifyDragnet::VerificationResult?

Performs the verification. If the result field contains the “failed” text then a result key will be added to the Test Record explaining the reason for the failure.

Returns:



15
16
17
18
19
20
21
22
# File 'lib/dragnet/verifiers/result_verifier.rb', line 15

def verify
  return if test_record.passed?

  Dragnet::VerificationResult.new(
    status: :failed,
    reason: "'result' field has the status '#{result}'"
  )
end