Skip to content

test: add test coverage and update docker related file - #312

Merged
xuan-cao-swi merged 1 commit into
mainfrom
test-coverage
Oct 8, 2026
Merged

xuan-cao-swi merged 1 commit into
mainfrom
test-coverage

Conversation

@xuan-cao-swi

Copy link
Copy Markdown
Contributor

Description

  1. Increase the test coverage to 95%
  2. Update the Dockerfile to use ruby 3.4.1

Test (if applicable)

@xuan-cao-swi
xuan-cao-swi requested review from a team as code owners October 7, 2026 17:59
Copilot AI balanced review requested due to automatic review settings October 7, 2026 17:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Comment thread test/Dockerfile
RUN . ~/.profile \
&& cd /root/.rbenv/plugins/ruby-build && git pull && cd - \
&& rbenv install 3.2.6
&& rbenv install 3.4.1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@cheempz cheempz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread test/Dockerfile
RUN . ~/.profile \
&& cd /root/.rbenv/plugins/ruby-build && git pull && cd - \
&& rbenv install 3.2.6
&& rbenv install 3.4.1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@xuan-cao-swi
xuan-cao-swi merged commit 6e2561c into main Oct 8, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants