Skip to content

Commit

Permalink
PMM-12894 Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
artemgavrilov committed Feb 22, 2024
1 parent 5ac590d commit c2affb0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
16 changes: 9 additions & 7 deletions api-tests/inventory/agents_postgres_exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,13 @@ func TestPostgresExporter(t *testing.T) {
assert.Equal(t, &agents.ChangePostgresExporterOK{
Payload: &agents.ChangePostgresExporterOKBody{
PostgresExporter: &agents.ChangePostgresExporterOKBodyPostgresExporter{
AgentID: agentID,
ServiceID: serviceID,
Username: "username",
PMMAgentID: pmmAgentID,
Disabled: true,
Status: &AgentStatusUnknown,
AgentID: agentID,
ServiceID: serviceID,
Username: "username",
PMMAgentID: pmmAgentID,
Disabled: true,
Status: &AgentStatusUnknown,
MaxExporterConnections: 10,
},
},
}, changePostgresExporterOK)
Expand Down Expand Up @@ -139,7 +140,8 @@ func TestPostgresExporter(t *testing.T) {
CustomLabels: map[string]string{
"new_label": "postgres_exporter",
},
Status: &AgentStatusUnknown,
Status: &AgentStatusUnknown,
MaxExporterConnections: 10,
},
},
}, changePostgresExporterOK)
Expand Down
1 change: 1 addition & 0 deletions managed/services/converters.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ func ToAPIAgent(q *reform.Querier, agent *models.Agent) (inventorypb.Agent, erro
}
if agent.PostgreSQLOptions != nil {
exporter.AutoDiscoveryLimit = agent.PostgreSQLOptions.AutoDiscoveryLimit
exporter.MaxExporterConnections = agent.PostgreSQLOptions.MaxExporterConnections
}
return exporter, nil
case models.QANMySQLPerfSchemaAgentType:
Expand Down

0 comments on commit c2affb0

Please sign in to comment.