-
Notifications
You must be signed in to change notification settings - Fork 600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create test for agent_helper in gem files #2118
Conversation
# See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. | ||
# frozen_string_literal: true | ||
|
||
require 'minitest/autorun' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ajesler - I swapped out the test_helper
require statement with minitest/autorun
because we don't want/need the agent to be loaded for this particular test.
This is what we do with our other utilities, like our CveNotifierTests
Co-authored-by: AJ Esler <[email protected]>
bdccfd4
to
4049ec6
Compare
Hmm... local tests and the CI aren't matching. I'm going to come back to this after the release. |
effectively fork `Gem::Specification.load` to bypass its internal caching mechanism, and catch parse failures with an assertion.
When parsing `newrelic_rpm.gemspec` from a directory other than the project root, make sure that the `.build_ignore` file can be found by leveraging its absolute path
We were previously skipping the `rails<version>` env tests, but not the `norails` ones. Skip those too.
The automated CI tests only run the 'env' suites, so we can't skip `norails`. Instead, just chdir to the root of the agent dir, which is where any production targetting `gem build` process will take place.
Skip older Rubygems based contexts
CI: gemspec files test - bypass cache
SimpleCov Report
|
This PR adds a test to ensure the
test/agent_helper.rb
file is included in the distributed gem.Thank you, @ajesler for your creative solution! 🌈
Resolves #2117