We need to change how auth works in order to support new Faraday versions (see https://github.com/bugsnag/bugsnag-api-ruby/pull/36), but the tests don't currently check the values of headers. This means that the auth headers could be wrong or missing entirely and the tests would still pass
This PR checks the headers that we set match between the cassette and the request made in the test (ignoring those set by Ruby/Faraday as they can change between versions). This showed that the basic auth header in the cassettes was already different to the actual header the specs used (the username:password combo didn't match)
The user agent header is special cased to avoid having to update it in every cassette for each release — we check it matches a regex with a version number, but the number can be different across requests
Changeset
Replace basic auth headers in cassettes with the real value the tests use
Match headers set by us when considering requests to be equal
Fixed a use of the TRAVIS environment variable which won't be set on GH Actions
Goal
We need to change how auth works in order to support new Faraday versions (see https://github.com/bugsnag/bugsnag-api-ruby/pull/36), but the tests don't currently check the values of headers. This means that the auth headers could be wrong or missing entirely and the tests would still pass
This PR checks the headers that we set match between the cassette and the request made in the test (ignoring those set by Ruby/Faraday as they can change between versions). This showed that the basic auth header in the cassettes was already different to the actual header the specs used (the username:password combo didn't match)
The user agent header is special cased to avoid having to update it in every cassette for each release — we check it matches a regex with a version number, but the number can be different across requests
Changeset
TRAVIS
environment variable which won't be set on GH Actions