Skip to content

chore(logging): adding config tests#22

Merged
Jacobbrewer1 merged 2 commits intomainfrom
chore/logging-cfg-tests
Apr 10, 2025
Merged

chore(logging): adding config tests#22
Jacobbrewer1 merged 2 commits intomainfrom
chore/logging-cfg-tests

Conversation

@Jacobbrewer1
Copy link
Owner

Describe your changes

This pull request introduces a new test file logging/config_test.go to improve the test coverage for the logging configuration. The main changes include the addition of helper functions and a series of test cases to verify different logging levels based on environment variables.

Key changes:

  • Added a new test file logging/config_test.go to enhance test coverage for logging configuration.
  • Implemented a helper function setEnv to manage environment variables within tests.
  • Introduced a series of test cases in TestNewLoggingConfig to validate logging levels (debug, info, warn, error) based on environment variable LOG_LEVEL.

@Jacobbrewer1 Jacobbrewer1 requested a review from Copilot April 10, 2025 10:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

logging/config_test.go:21

  • Consider adding test cases for unsupported or invalid logging levels to ensure newLoggingConfig handles unexpected values correctly.
tests := []struct {

@Jacobbrewer1 Jacobbrewer1 requested a review from Copilot April 10, 2025 10:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

@Jacobbrewer1 Jacobbrewer1 merged commit e88edd8 into main Apr 10, 2025
4 checks passed
@Jacobbrewer1 Jacobbrewer1 deleted the chore/logging-cfg-tests branch April 10, 2025 10:05
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants