-
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
migrate pipeline processor and filter tests to rspec #1133
Conversation
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.
Looks very good! Only a few minor suggestions.
spec/ddtrace/pipeline_spec.rb
Outdated
|
||
before do | ||
end |
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.
before do | |
end |
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.
👍 updated
def generate_span(name, parent = nil) | ||
Datadog::Span.new(nil, name).tap do |span| | ||
span.parent = parent | ||
end | ||
end | ||
|
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.
You might want to move this method in to a shared file, like Sidekiq does here: https://github.com/DataDog/dd-trace-rb/tree/64ec7458bd9e6fe010382cdd655044a8aca7264f/spec/ddtrace/contrib/sidekiq/support
We normally add a support/
directory with shared files in it.
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.
makes sense, updated
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.
✨
This PR moves over the
Datadog::Pipeline
,Datadog::Pipeline::SpanProcessor
, andDatadog::Pipeline::SpanFilter
minitest tests within the /tests folder to rspec spec's within the /spec folder. It tests what was covered in the minitest suite, specifically, the behavior of the trace pipeline, and the functionality of both OOTB processor and filter classes as well as arbitrary processors or filters as described here: https://github.com/DataDog/dd-trace-rb/blob/master/docs/GettingStarted.md#processing-pipeline