newrelic / newrelic-php-agent

The New Relic PHP Agent
https://opensource.newrelic.com/projects/newrelic/newrelic-php-agent
Apache License 2.0
120 stars 63 forks source link

fix(testing): Handles __FILE__ correctly for EXPECT_METRICS_EXIST #939

Closed mfulb closed 4 months ago

mfulb commented 4 months ago

The logic for handling "FILE" was reversed and this PR fixes it. The idea is that the actual JSON harvest will have the file name replaced with "FILE" and so the expected string should contain "FILE" and not have the actual file name inserted as the old code did.

newrelic-php-agent-bot commented 4 months ago
Test Suite Status Result
Multiverse :white_check_mark: 9/9 passing
SOAK :white_check_mark: 56/56 passing
codecov-commenter commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 78.56%. Comparing base (9f27ce9) to head (1da59db).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #939 +/- ## ======================================= Coverage 78.56% 78.56% ======================================= Files 193 193 Lines 27294 27294 ======================================= Hits 21444 21444 Misses 5850 5850 ``` | [Flag](https://app.codecov.io/gh/newrelic/newrelic-php-agent/pull/939/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic) | Coverage Δ | | |---|---|---| | [agent-for-php-7.0](https://app.codecov.io/gh/newrelic/newrelic-php-agent/pull/939/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic) | `77.48% <ø> (ø)` | | | [agent-for-php-7.1](https://app.codecov.io/gh/newrelic/newrelic-php-agent/pull/939/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic) | `77.23% <ø> (ø)` | | | [agent-for-php-7.2](https://app.codecov.io/gh/newrelic/newrelic-php-agent/pull/939/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic) | `78.16% <ø> (ø)` | | | [agent-for-php-7.3](https://app.codecov.io/gh/newrelic/newrelic-php-agent/pull/939/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic) | `78.18% <ø> (ø)` | | | [agent-for-php-7.4](https://app.codecov.io/gh/newrelic/newrelic-php-agent/pull/939/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic) | `77.88% <ø> (ø)` | | | [agent-for-php-8.0](https://app.codecov.io/gh/newrelic/newrelic-php-agent/pull/939/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic) | `77.91% <ø> (ø)` | | | [agent-for-php-8.1](https://app.codecov.io/gh/newrelic/newrelic-php-agent/pull/939/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic) | `77.90% <ø> (ø)` | | | [agent-for-php-8.2](https://app.codecov.io/gh/newrelic/newrelic-php-agent/pull/939/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic) | `77.49% <ø> (ø)` | | | [agent-for-php-8.3](https://app.codecov.io/gh/newrelic/newrelic-php-agent/pull/939/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic) | `77.49% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.