-
Notifications
You must be signed in to change notification settings - Fork 375
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
DEBUG-2507 Test individual product loading #3738
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3738 +/- ##
==========================================
- Coverage 98.10% 98.10% -0.01%
==========================================
Files 1227 1228 +1
Lines 73014 73027 +13
Branches 3508 3508
==========================================
+ Hits 71633 71645 +12
- Misses 1381 1382 +1 ☔ View full report in Codecov by Sentry. |
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.
Awesome clean up!
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.
How is this PR different from #3646 ?
spec/loading_spec.rb
Outdated
@@ -0,0 +1,39 @@ | |||
require 'English' |
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.
Do we need this require 'English'
?
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.
I don't think it is necessary now, removed.
The tests are redone to use |
Also the PR is a new one because the branch is in the main repo, not in a fork for CI reasons. |
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.
The test LGTM. Not entirely sure about the appsec changes.
@@ -1,6 +1,6 @@ | |||
# frozen_string_literal: true | |||
|
|||
require_relative '../../../tracing/contrib/rack/middlewares' | |||
require_relative '../../../tracing/contrib' |
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.
Individual contribs require the REGISTRY constant defined by top-level contrib.
@@ -1,6 +1,7 @@ | |||
# frozen_string_literal: true | |||
|
|||
require_relative 'configuration' | |||
require_relative '../core/configuration' |
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.
There is a dependency on Core::Configuration in this file.
@TonyCTHsu I added comments for the appsec changes, if there is a different solution that would also be fine with me. |
end | ||
|
||
it 'loads successfully by itself' do | ||
rv = system("ruby -e #{Shellwords.shellescape(code)}") |
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.
Hey I didn't know shellescape
existed! This is cool!
* master: (54 commits) Update gemfiles/* Generate Ruby 3.4 gemfiles and lockfiles Add Ruby 3.4 to appraisals use method instead of instance variable fix flaky test fix deadlock issue: don't flush_events in main thread when calling stop, override #work_pending? instead Remove useless (and conflicting) constant Disable Rubocop warning about encoding Declare encoding as UTF-8 Adjust test to take new file into account Extract matrix from Rakefile Test individual product loading (DataDog#3738) Refactor Replace show command with select_spec without regex match Fix false positive of show command Prevent overwriting Gemfile Remove unnecessary output Invoke with `library_entrypoint Fix events array Implement telemetry ...
Replacement for #3646.
This PR tests that each product can be loaded by itself, and repairs appsec to be loadable without tracing having already been loaded.
The tests are redone to use system rather than forking and no longer require a separate job.