Repository navigation
test: add test coverage and update docker related file - #312
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The Docker image installs Ruby 3.4.1 but does not configure rbenv to use it.
1 open finding
What changed in this PR
Adds targeted test coverage for error handling, logging, configuration, propagation, and sampling while updating the development container configuration.
Changes:
- Adds tests for fallback, logging, and error paths.
- Tests in-code OpenTelemetry resource attributes.
- Updates Docker development settings for Ruby 3.4.1 and log compression.
| File | Description |
|---|---|
test/support/txn_name_manager_test.rb |
Expands transaction-name manager coverage. |
test/support/transaction_settings_test.rb |
Tests configuration lookup failure fallback. |
test/solarwinds_apm/otel_config_propagator_test.rb |
Tests resource attribute configuration. |
test/solarwinds_apm/init_test/init_5_test.rb |
Tests initialization failure handling. |
test/sampling/http_sampler_test.rb |
Covers request and thread error paths. |
test/patch/sw_dbo_utils_test.rb |
Tests SQL annotation failure handling. |
test/opentelemetry/solarwinds_response_propagator_test.rb |
Covers injection logging and errors. |
test/opentelemetry/solarwinds_propagator_test.rb |
Expands tracestate injection coverage. |
test/Dockerfile |
Installs Ruby 3.4.1. |
test/docker-compose.yml |
Disables log compression. |
test/api/tracing_ready_test.rb |
Tests deprecated argument warning. |
test/api/api_test.rb |
Covers API logging and deprecated helper behavior. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| RUN . ~/.profile \ | ||
| && cd /root/.rbenv/plugins/ruby-build && git pull && cd - \ | ||
| && rbenv install 3.2.6 | ||
| && rbenv install 3.4.1 |
There was a problem hiding this comment.
Suggestion seems invalid since the ruby version is set interactively at container run time per https://github.com/solarwinds/apm-ruby/blob/main/CONTRIBUTING.md#advanced-setup-optional
| RUN . ~/.profile \ | ||
| && cd /root/.rbenv/plugins/ruby-build && git pull && cd - \ | ||
| && rbenv install 3.2.6 | ||
| && rbenv install 3.4.1 |
There was a problem hiding this comment.
Suggestion seems invalid since the ruby version is set interactively at container run time per https://github.com/solarwinds/apm-ruby/blob/main/CONTRIBUTING.md#advanced-setup-optional

Description
Test (if applicable)