Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Tymchuk authored Sep 28, 2023
2 parents bd77a69 + d9e58e1 commit 8f439f0
Show file tree
Hide file tree
Showing 16 changed files with 30 additions and 113 deletions.
5 changes: 2 additions & 3 deletions api-tests/inventory/nodes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ func TestContainerNodeDeprecated(t *testing.T) {
ContainerID: "docker-id",
ContainerName: "docker-name",
MachineID: "machine-id",
Address: "10.10.1.10",
Address: "10.10.1.11",
},
Context: pmmapitests.Context,
}
Expand All @@ -377,7 +377,7 @@ func TestContainerNodeDeprecated(t *testing.T) {
ContainerID: "docker-id",
ContainerName: "docker-name",
MachineID: "machine-id",
Address: "10.10.1.10",
Address: "10.10.1.11",
},
},
}
Expand Down Expand Up @@ -688,7 +688,6 @@ func TestRemoveNode(t *testing.T) {
Address: "localhost",
Port: 3306,
ServiceName: serviceName,
Cluster: serviceName,
},
},
}, listAgentsOK.Payload)
Expand Down
12 changes: 0 additions & 12 deletions api-tests/inventory/services_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,6 @@ func TestMySQLService(t *testing.T) {
Address: "localhost",
Port: 3306,
ServiceName: serviceName,
Cluster: serviceName,
},
},
}, res)
Expand All @@ -373,7 +372,6 @@ func TestMySQLService(t *testing.T) {
Address: "localhost",
Port: 3306,
ServiceName: serviceName,
Cluster: serviceName,
},
},
}, serviceRes)
Expand Down Expand Up @@ -555,7 +553,6 @@ func TestMongoDBService(t *testing.T) {
ServiceID: serviceID,
NodeID: genericNodeID,
ServiceName: serviceName,
Cluster: serviceName,
Address: "localhost",
Port: 27017,
},
Expand All @@ -576,7 +573,6 @@ func TestMongoDBService(t *testing.T) {
ServiceID: serviceID,
NodeID: genericNodeID,
ServiceName: serviceName,
Cluster: serviceName,
Address: "localhost",
Port: 27017,
},
Expand Down Expand Up @@ -733,7 +729,6 @@ func TestMongoDBService(t *testing.T) {
ServiceID: serviceID,
NodeID: genericNodeID,
ServiceName: serviceName,
Cluster: serviceName,
Socket: "/tmp/mongodb-27017.sock",
},
},
Expand Down Expand Up @@ -775,7 +770,6 @@ func TestPostgreSQLService(t *testing.T) {
DatabaseName: defaultPostgresDBName,
Port: 5432,
ServiceName: serviceName,
Cluster: serviceName,
},
},
}, res)
Expand All @@ -797,7 +791,6 @@ func TestPostgreSQLService(t *testing.T) {
DatabaseName: defaultPostgresDBName,
Port: 5432,
ServiceName: serviceName,
Cluster: serviceName,
},
},
}, serviceRes)
Expand Down Expand Up @@ -980,7 +973,6 @@ func TestProxySQLService(t *testing.T) {
Address: "localhost",
Port: 5432,
ServiceName: serviceName,
Cluster: serviceName,
},
},
}, res)
Expand All @@ -1001,7 +993,6 @@ func TestProxySQLService(t *testing.T) {
Address: "localhost",
Port: 5432,
ServiceName: serviceName,
Cluster: serviceName,
},
},
}, serviceRes)
Expand Down Expand Up @@ -1193,7 +1184,6 @@ func TestExternalService(t *testing.T) {
ServiceID: serviceID,
NodeID: genericNodeID,
ServiceName: serviceName,
Cluster: serviceName,
Group: "redis",
},
},
Expand All @@ -1213,7 +1203,6 @@ func TestExternalService(t *testing.T) {
ServiceID: serviceID,
NodeID: genericNodeID,
ServiceName: serviceName,
Cluster: serviceName,
Group: "redis",
},
},
Expand Down Expand Up @@ -1345,7 +1334,6 @@ func TestExternalService(t *testing.T) {
ServiceID: serviceID,
NodeID: genericNodeID,
ServiceName: serviceName,
Cluster: serviceName,
Group: "external",
},
},
Expand Down
2 changes: 0 additions & 2 deletions api-tests/management/external_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ func TestAddExternal(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
Cluster: serviceName,
Group: "external",
},
}, *serviceOK.Payload)
Expand Down Expand Up @@ -226,7 +225,6 @@ func TestAddExternal(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
Cluster: serviceName,
Group: "external",
},
}, *serviceOK.Payload)
Expand Down
2 changes: 0 additions & 2 deletions api-tests/management/haproxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ func TestAddHAProxy(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
Cluster: serviceName,
},
}, *serviceOK.Payload)

Expand Down Expand Up @@ -226,7 +225,6 @@ func TestAddHAProxy(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
Cluster: serviceName,
},
}, *serviceOK.Payload)

Expand Down
7 changes: 0 additions & 7 deletions api-tests/management/mongodb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ func TestAddMongoDB(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
Cluster: serviceName,
Address: "10.10.10.10",
Port: 27017,
},
Expand Down Expand Up @@ -155,7 +154,6 @@ func TestAddMongoDB(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
Cluster: serviceName,
Address: "10.10.10.10",
Port: 27017,
},
Expand Down Expand Up @@ -391,7 +389,6 @@ func TestAddMongoDB(t *testing.T) {
ServiceID: serviceID,
NodeID: newNodeID,
ServiceName: serviceName,
Cluster: serviceName,
Address: "10.10.10.10",
Port: 27017,
},
Expand Down Expand Up @@ -610,7 +607,6 @@ func TestAddMongoDB(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
Cluster: serviceName,
Socket: "/tmp/mongodb-27017.sock",
},
}, *serviceOK.Payload)
Expand Down Expand Up @@ -682,7 +678,6 @@ func TestAddMongoDB(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
Cluster: serviceName,
Address: "10.10.10.10",
Port: 27017,
},
Expand Down Expand Up @@ -755,7 +750,6 @@ func TestAddMongoDB(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
Cluster: serviceName,
Address: "10.10.10.10",
Port: 27017,
},
Expand Down Expand Up @@ -827,7 +821,6 @@ func TestAddMongoDB(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
Cluster: serviceName,
Address: "10.10.10.10",
Port: 27017,
},
Expand Down
6 changes: 0 additions & 6 deletions api-tests/management/mysql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ func TestAddMySQL(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
Cluster: serviceName,
Address: "10.10.10.10",
Port: 3306,
},
Expand Down Expand Up @@ -160,7 +159,6 @@ func TestAddMySQL(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
Cluster: serviceName,
Address: "10.10.10.10",
Port: 3306,
},
Expand Down Expand Up @@ -415,7 +413,6 @@ func TestAddMySQL(t *testing.T) {
ServiceID: serviceID,
NodeID: newNodeID,
ServiceName: serviceName,
Cluster: serviceName,
Address: "10.10.10.10",
Port: 27017,
},
Expand Down Expand Up @@ -669,7 +666,6 @@ func TestAddMySQL(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
Cluster: serviceName,
Address: "10.10.10.10",
Port: 3306,
},
Expand Down Expand Up @@ -745,7 +741,6 @@ func TestAddMySQL(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
Cluster: serviceName,
Address: "10.10.10.10",
Port: 3306,
},
Expand Down Expand Up @@ -820,7 +815,6 @@ func TestAddMySQL(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
Cluster: serviceName,
Address: "10.10.10.10",
Port: 3306,
},
Expand Down
7 changes: 0 additions & 7 deletions api-tests/management/postgresql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ func TestAddPostgreSQL(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
Cluster: serviceName,
DatabaseName: defaultPostgresDBName,
Address: "10.10.10.10",
Port: 5432,
Expand Down Expand Up @@ -162,7 +161,6 @@ func TestAddPostgreSQL(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
Cluster: serviceName,
DatabaseName: defaultPostgresDBName,
Address: "10.10.10.10",
Port: 5432,
Expand Down Expand Up @@ -263,7 +261,6 @@ func TestAddPostgreSQL(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
Cluster: serviceName,
DatabaseName: defaultPostgresDBName,
Address: "10.10.10.10",
Port: 5432,
Expand Down Expand Up @@ -413,7 +410,6 @@ func TestAddPostgreSQL(t *testing.T) {
ServiceID: serviceID,
NodeID: newNodeID,
ServiceName: serviceName,
Cluster: serviceName,
DatabaseName: defaultPostgresDBName,
Address: "10.10.10.10",
Port: 27017,
Expand Down Expand Up @@ -640,7 +636,6 @@ func TestAddPostgreSQL(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
Cluster: serviceName,
DatabaseName: defaultPostgresDBName,
Address: "10.10.10.10",
Port: 5432,
Expand Down Expand Up @@ -716,7 +711,6 @@ func TestAddPostgreSQL(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
Cluster: serviceName,
DatabaseName: defaultPostgresDBName,
Address: "10.10.10.10",
Port: 5432,
Expand Down Expand Up @@ -791,7 +785,6 @@ func TestAddPostgreSQL(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
Cluster: serviceName,
DatabaseName: defaultPostgresDBName,
Address: "10.10.10.10",
Port: 5432,
Expand Down
16 changes: 7 additions & 9 deletions api-tests/management/proxysql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ func TestAddProxySQL(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
Cluster: serviceName,
Address: "10.10.10.10",
Port: 3306,
},
Expand Down Expand Up @@ -156,7 +155,6 @@ func TestAddProxySQL(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
Cluster: serviceName,
Address: "10.10.10.10",
Port: 3306,
},
Expand Down Expand Up @@ -262,12 +260,13 @@ func TestAddProxySQL(t *testing.T) {
params := &proxysql.AddProxySQLParams{
Context: pmmapitests.Context,
Body: proxysql.AddProxySQLBody{
NodeID: nodeID,
PMMAgentID: pmmAgentID,
ServiceName: serviceName,
Address: "10.10.10.10",
Port: 3306,
Username: "username",
NodeID: nodeID,
PMMAgentID: pmmAgentID,
ServiceName: serviceName,
Address: "10.10.10.10",
Port: 3306,
Username: "username",

SkipConnectionCheck: true,
},
}
Expand Down Expand Up @@ -387,7 +386,6 @@ func TestAddProxySQL(t *testing.T) {
ServiceID: serviceID,
NodeID: newNodeID,
ServiceName: serviceName,
Cluster: serviceName,
Address: "10.10.10.10",
Port: 27017,
},
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ require (
github.com/pkg/errors v0.9.1
github.com/pmezard/go-difflib v1.0.0
github.com/prometheus/alertmanager v0.26.0
github.com/prometheus/client_golang v1.16.0
github.com/prometheus/client_golang v1.17.0
github.com/prometheus/common v0.44.0
github.com/ramr/go-reaper v0.2.1
github.com/robfig/cron/v3 v3.0.1
Expand Down Expand Up @@ -236,10 +236,10 @@ require (
github.com/paulmach/orb v0.10.0 // indirect
github.com/pierrec/lz4/v4 v4.1.17 // indirect
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect
github.com/prometheus/common/sigv4 v0.1.0 // indirect
github.com/prometheus/exporter-toolkit v0.10.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/prometheus/procfs v0.11.1 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rs/xid v1.5.0 // indirect
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect
Expand Down
Loading

0 comments on commit 8f439f0

Please sign in to comment.