diff --git a/managed/models/agent_model_test.go b/managed/models/agent_model_test.go index ddc060d36c..909d49b3aa 100644 --- a/managed/models/agent_model_test.go +++ b/managed/models/agent_model_test.go @@ -249,9 +249,11 @@ func TestAgent(t *testing.T) { func TestPostgresAgentTLS(t *testing.T) { agent := &models.Agent{ - Username: pointer.ToString("username"), - Password: pointer.ToString("s3cur3 p@$$w0r4."), - AgentType: models.PostgresExporterType, + Username: pointer.ToString("username"), + Password: pointer.ToString("s3cur3 p@$$w0r4."), + AgentType: models.PostgresExporterType, + ExporterOptions: &models.ExporterOptions{}, + PostgreSQLOptions: &models.PostgreSQLOptions{}, } service := &models.Service{ Address: pointer.ToString("1.2.3.4"), diff --git a/managed/services/agents/mongodb_test.go b/managed/services/agents/mongodb_test.go index 202c9b737d..6cb5f285a2 100644 --- a/managed/services/agents/mongodb_test.go +++ b/managed/services/agents/mongodb_test.go @@ -262,6 +262,7 @@ func TestMongodbExporterConfig2411(t *testing.T) { TemplateLeftDelim: "{{", TemplateRightDelim: "}}", Args: []string{ + "--collector.collstats-limit=0", "--collector.diagnosticdata", "--collector.replicasetstatus", "--compatible-mode", @@ -450,6 +451,7 @@ func TestMongodbExporterConfig2430(t *testing.T) { TemplateLeftDelim: "{{", TemplateRightDelim: "}}", Args: []string{ + "--collector.collstats-limit=0", "--collector.diagnosticdata", "--collector.fcv", "--collector.pbm", @@ -710,6 +712,7 @@ func TestMongodbExporterConfig228_WebConfigAuth(t *testing.T) { } expectedArgs := []string{ + "--collector.collstats-limit=0", "--collector.diagnosticdata", "--collector.replicasetstatus", "--compatible-mode", @@ -727,11 +730,13 @@ func TestMongodbExporterConfig228_WebConfigAuth(t *testing.T) { t.Parallel() localExporter := &models.Agent{ - AgentID: exporter.AgentID, - AgentType: exporter.AgentType, - Username: exporter.Username, - Password: exporter.Password, - AgentPassword: pointer.ToString("agent-custom-password"), + AgentID: exporter.AgentID, + AgentType: exporter.AgentType, + Username: exporter.Username, + Password: exporter.Password, + AgentPassword: pointer.ToString("agent-custom-password"), + ExporterOptions: &models.ExporterOptions{}, + MongoDBOptions: &models.MongoDBOptions{}, } actual, err := mongodbExporterConfig(node, mongodb, localExporter, redactSecrets, pmmAgentVersion) @@ -756,10 +761,12 @@ func TestMongodbExporterConfig228_WebConfigAuth(t *testing.T) { t.Parallel() localExporter := &models.Agent{ - AgentID: exporter.AgentID, - AgentType: exporter.AgentType, - Username: exporter.Username, - Password: exporter.Password, + AgentID: exporter.AgentID, + AgentType: exporter.AgentType, + Username: exporter.Username, + Password: exporter.Password, + ExporterOptions: &models.ExporterOptions{}, + MongoDBOptions: &models.MongoDBOptions{}, } actual, err := mongodbExporterConfig(node, mongodb, localExporter, redactSecrets, pmmAgentVersion)