Skip to content

Commit

Permalink
re-enabling the checksum mismatch code that wasn't noisy
Browse files Browse the repository at this point in the history
  • Loading branch information
jmartin-sul committed Sep 4, 2018
1 parent eeb45a6 commit 00e843a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 2 additions & 1 deletion app/services/audit_results.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class AuditResults
MANIFEST_NOT_IN_MOAB,
SIGNATURE_CATALOG_NOT_IN_MOAB,
INVALID_MANIFEST,
UNABLE_TO_CHECK_STATUS,
UNABLE_TO_CHECK_STATUS
# Temporary fix for workflow-service throwing exceptions
# because some error reports from MoabReplicationAudit are too long
# also see HONEYBADGER_REPORT_CODES
Expand All @@ -100,6 +100,7 @@ class AuditResults
].freeze

HONEYBADGER_REPORT_CODES = [
MOAB_FILE_CHECKSUM_MISMATCH
# temporary fix for Honeybadger throttling us
# due to too many MoabReplicationAudit errors
# also see WORKFLOW_REPORT_CODES
Expand Down
8 changes: 3 additions & 5 deletions spec/services/audit_results_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -251,13 +251,11 @@
audit_results.report_results
end
it 'sends results in HONEYBADGER_REPORT_CODES errors' do
skip "Temporarily turning this off to ease honeybadger throttling and worflow choking"
code = AuditResults::ZIP_PART_NOT_FOUND
addl_hash = { endpoint_name: 'zip_ep', s3_key: "ab123cd4567.v0001.zip", bucket_name: 'bucket_name' }
code = AuditResults::MOAB_FILE_CHECKSUM_MISMATCH
addl_hash = { file_path: 'path/to/file', version: 1 }
audit_results.add_result(code, addl_hash)
prefix = '(ab123cd4567, fixture_sr1)'
expect(Honeybadger).to receive(:notify).with(
"#{prefix} replicated part not found on zip_ep: ab123cd4567.v0001.zip was not found on bucket_name"
"(ab123cd4567, fixture_sr1) checksums for path/to/file version 1 do not match."
)
audit_results.report_results
end
Expand Down

0 comments on commit 00e843a

Please sign in to comment.