Skip to content

Commit

Permalink
PMM-5086-12634 Fix for another tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
JiriCtvrtka committed Dec 4, 2024
1 parent e7ab845 commit 1a661a8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
8 changes: 5 additions & 3 deletions managed/models/agent_model_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
25 changes: 16 additions & 9 deletions managed/services/agents/mongodb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ func TestMongodbExporterConfig2411(t *testing.T) {
TemplateLeftDelim: "{{",
TemplateRightDelim: "}}",
Args: []string{
"--collector.collstats-limit=0",
"--collector.diagnosticdata",
"--collector.replicasetstatus",
"--compatible-mode",
Expand Down Expand Up @@ -450,6 +451,7 @@ func TestMongodbExporterConfig2430(t *testing.T) {
TemplateLeftDelim: "{{",
TemplateRightDelim: "}}",
Args: []string{
"--collector.collstats-limit=0",
"--collector.diagnosticdata",
"--collector.fcv",
"--collector.pbm",
Expand Down Expand Up @@ -710,6 +712,7 @@ func TestMongodbExporterConfig228_WebConfigAuth(t *testing.T) {
}

expectedArgs := []string{
"--collector.collstats-limit=0",
"--collector.diagnosticdata",
"--collector.replicasetstatus",
"--compatible-mode",
Expand All @@ -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)

Expand All @@ -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)

Expand Down

0 comments on commit 1a661a8

Please sign in to comment.