Skip to content
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

[otelcol] Add unit test for implicit config use case #9302

Merged
merged 4 commits into from
Jan 22, 2024

Conversation

yurishkuro
Copy link
Member

Description:

  • Add unit test that illustrates running the command without an external config
  • This models how Jaeger all-in-one uses collector because all-in-one can be run without arguments, for maximum user friendliness

Signed-off-by: Yuri Shkuro <github@ysh.us>
@yurishkuro yurishkuro requested review from a team and bogdandrutu January 17, 2024 16:40
@yurishkuro yurishkuro added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Jan 17, 2024
yurishkuro and others added 2 commits January 17, 2024 11:51
Signed-off-by: Yuri Shkuro <github@ysh.us>
Copy link

codecov bot commented Jan 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6712bf2) 90.33% compared to head (1370533) 90.36%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9302      +/-   ##
==========================================
+ Coverage   90.33%   90.36%   +0.02%     
==========================================
  Files         340      340              
  Lines       17968    17968              
==========================================
+ Hits        16232    16237       +5     
+ Misses       1412     1407       -5     
  Partials      324      324              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -26,6 +27,26 @@ func TestNewCommandNoConfigURI(t *testing.T) {
require.Error(t, cmd.Execute())
}

// This test emulates usage of Collector in Jaeger all-in-one, which
// allows running the binary with no explicit configuration.
func TestNewCommandImplicitConfig(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

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

Can we call this "ProgrammaticallyPassConfig"?

Signed-off-by: Yuri Shkuro <github@ysh.us>
@bogdandrutu bogdandrutu merged commit d78b748 into open-telemetry:main Jan 22, 2024
32 checks passed
@github-actions github-actions bot added this to the next release milestone Jan 22, 2024
TylerHelmuth pushed a commit to TylerHelmuth/opentelemetry-collector that referenced this pull request Jan 23, 2024
…9302)

**Description:** 
* Add unit test that illustrates running the command without an external
config
* This models how Jaeger all-in-one uses collector because all-in-one
can be run without arguments, for maximum user friendliness

---------

Signed-off-by: Yuri Shkuro <github@ysh.us>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants