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

Fix the bug that the default configs of slice/map are not overridden #497

Merged
merged 3 commits into from
Apr 3, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add descriptions to the testcases
Signed-off-by: Daxin Wang <daxinwang@harmonycloud.cn>
Daxin Wang committed Apr 3, 2023
commit 9c100086f5582246bea0acb7ae53ef859f5ceaa0
4 changes: 3 additions & 1 deletion collector/internal/application/factory_test.go
Original file line number Diff line number Diff line change
@@ -49,7 +49,9 @@ func TestConstructConfig(t *testing.T) {
ConntrackMaxStateSize: 131072,
ConntrackRateLimit: 500,
ProcRoot: "/proc",
ProtocolParser: []string{"http", "mysql", "dns", "redis", "kafka", "dubbo"},
// Case: This slice is from the default config. The config file doesn't have this field.
ProtocolParser: []string{"http", "mysql", "dns", "redis", "kafka", "dubbo"},
// Case: This slice is overridden by the config file. The default config is different.
ProtocolConfigs: []network.ProtocolConfig{
{
Key: "http",