Skip to content

test coverage for internal/logger#229

Merged
gflarity merged 2 commits into
ai-dynamo:mainfrom
gflarity:gflarity/test_coverage_internal_logger
Nov 5, 2025
Merged

test coverage for internal/logger#229
gflarity merged 2 commits into
ai-dynamo:mainfrom
gflarity:gflarity/test_coverage_internal_logger

Conversation

@gflarity

Copy link
Copy Markdown
Contributor

What type of PR is this?

Testing

What this PR does / why we need it:

Increased unit test coverage.

Which issue(s) this PR fixes:

Special notes for your reviewer:

Here's the instructions:

Please create an idiomatic golang unit tests for this specific directory/package. Herea are the instructions:

  • Start by revieiwng the state of test coverage with golang tooling.
  • Be sure to document the fields in the anonymous test structs and how they'll be used below.
  • Each Test* function should also have some concise documentation as well. Each test case should have a brief explanation and expectation explaine. This should be right before the go struct definition for that test if it's table driven tests.
  • Each test should have a name field for cross referencing failures.
  • Rather than having a description field, the description should just be in comments above the name in the struct declaration.
  • Don't forget to run the tests and confirm they're working, but focus on just testing this package as others might have issues.
  • Please avoid creating skipped tests.
  • Refactor code to make it more testable if necessary. However keep these refactors to a minimum and as simple as possible.
  • Specifically hardcoded constants etc are good candidates to be refactor out of testable code. As are interface that can be mocked in a straight forward way. However you must remember to ensure backwards compatibility and new functions rather than changing the signature of public functions. Avoid making these test helpers public though. Only make such refactors when there's a good return on investment.
  • Please ensure coverage is as good as possible using golang tooling.
  • Avoid creating table driven tests when the test function just has a single test in it.
  • Avoid test that don't really test anything.
  • Avoid describing tests as edge cases.
  • Avoid tests for command line arguments. Try to keep test cases unique and adding value (avoid duplicate test cases).

Does this PR introduce a API change?

NONE

@coderabbitai

coderabbitai Bot commented Oct 23, 2025

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gflarity gflarity force-pushed the gflarity/test_coverage_internal_logger branch from b651b4d to 1ff3d6a Compare October 24, 2025 00:56
Signed-off-by: Geoff Flarity <gflarity@nvidia.com>
Signed-off-by: Geoff Flarity <gflarity@nvidia.com>
@gflarity gflarity force-pushed the gflarity/test_coverage_internal_logger branch from 1ff3d6a to 3cfd445 Compare November 3, 2025 22:20
@gflarity gflarity merged commit b95603e into ai-dynamo:main Nov 5, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants