Skip to content

Commit e92b341

Browse files
committed
PMM-9870 fix test and linters.
1 parent d1e955c commit e92b341

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

exporter/common.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ func makeExcludeFilter(exclude []string) *primitive.E {
106106
if len(exclude) == 0 {
107107
return nil
108108
}
109+
109110
filterExpressions := make([]bson.D, 0, len(exclude))
110111
for _, dbname := range exclude {
111112
filterExpressions = append(filterExpressions,
@@ -117,11 +118,11 @@ func makeExcludeFilter(exclude []string) *primitive.E {
117118
}
118119

119120
func makeDBsFilter(filterInNamespaces []string) *primitive.E {
120-
121121
nss := removeEmptyStrings(filterInNamespaces)
122122
if len(nss) == 0 {
123123
return nil
124124
}
125+
125126
filterExpressions := make([]bson.D, 0, len(nss))
126127
for _, namespace := range nss {
127128
parts := strings.Split(namespace, ".")

exporter/diagnostic_data_collector_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ func TestDiagnosticDataCollector(t *testing.T) {
4444

4545
client := tu.DefaultTestClient(ctx, t)
4646
logger := logrus.New()
47-
logger.SetLevel(logrus.DebugLevel)
4847
ti := labelsGetterMock{}
4948

5049
dbBuildInfo, err := retrieveMongoDBBuildInfo(ctx, client, logger.WithField("component", "test"))

exporter/replset_config_collector_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func TestReplsetConfigCollector(t *testing.T) {
4040

4141
// The last \n at the end of this string is important
4242
expected := strings.NewReader(`
43-
# HELP mongodb_rs_cfg_protocolVersion rs_cfg.
43+
# HELP mongodb_rs_cfg_protocolVersion rs_cfg.protocolVersion
4444
# TYPE mongodb_rs_cfg_protocolVersion untyped
4545
mongodb_rs_cfg_protocolVersion 1` + "\n")
4646
// Filter metrics for 2 reasons:

0 commit comments

Comments
 (0)