Skip to content

Commit

Permalink
Add maze runner test for redacted keys
Browse files Browse the repository at this point in the history
  • Loading branch information
imjoehaines committed Oct 4, 2021
1 parent 50957b4 commit 3be10d3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions features/fixtures/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ services:
- BUGSNAG_PROXY_PASSWORD
- BUGSNAG_PROXY_PORT
- BUGSNAG_PROXY_USER
- BUGSNAG_REDACTED_KEYS
- BUGSNAG_RELEASE_STAGE
- BUGSNAG_SEND_CODE
- BUGSNAG_SEND_ENVIRONMENT
Expand Down
1 change: 1 addition & 0 deletions features/fixtures/plain/app/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def configure_using_environment
conf.proxy_password = ENV["BUGSNAG_PROXY_PASSWORD"] if ENV.include? "BUGSNAG_PROXY_PASSWORD"
conf.proxy_port = ENV["BUGSNAG_PROXY_PORT"] if ENV.include? "BUGSNAG_PROXY_PORT"
conf.proxy_user = ENV["BUGSNAG_PROXY_USER"] if ENV.include? "BUGSNAG_PROXY_USER"
conf.redacted_keys << ENV["BUGSNAG_REDACTED_KEYS"] if ENV.include? "BUGSNAG_REDACTED_KEYS"
conf.send_environment = ENV["BUGSNAG_SEND_ENVIRONMENT"] != "false"
conf.send_code = ENV["BUGSNAG_SEND_CODE"] != "false"
conf.timeout = ENV["BUGSNAG_TIMEOUT"] if ENV.include? "BUGSNAG_TIMEOUT"
Expand Down
7 changes: 7 additions & 0 deletions features/plain_features/filters.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,10 @@ Scenario: Additional filters can be added to the filter list
And I wait to receive a request
Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
And the event "metaData.filter.filter_me" equals "[FILTERED]"

Scenario: Redacted keys can also be used to filter sensitive data
Given I set environment variable "BUGSNAG_REDACTED_KEYS" to "filter_me"
When I run the service "plain-ruby" with the command "bundle exec ruby filters/additional_filters.rb"
And I wait to receive a request
Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
And the event "metaData.filter.filter_me" equals "[FILTERED]"

0 comments on commit 3be10d3

Please sign in to comment.