Skip to content

Commit

Permalink
PMM-11180 Improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
BupycHuk committed Oct 16, 2024
1 parent c6ccc53 commit 6efc356
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
8 changes: 4 additions & 4 deletions agent/agents/mongodb/internal/profiler/profiler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ func TestProfiler(t *testing.T) {
tempDir := t.TempDir()
sslDSN, err := templates.RenderDSN(sslDSNTemplate, files, tempDir)
require.NoError(t, err)
for _, url := range []string{
"mongodb://root:[email protected]:27017/admin",
sslDSN,
for name, url := range map[string]string{
"normal": tests.GetTestMongoDBDSN(t),
"ssl": sslDSN,
} {
t.Run(url, func(t *testing.T) {
t.Run(name, func(t *testing.T) {
testProfiler(t, url)
})
}
Expand Down
1 change: 0 additions & 1 deletion agent/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ services:
- --sslPEMKeyFile=/etc/ssl/certificates/server.pem
- --sslCAFile=/etc/ssl/certificates/ca.crt
- --sslWeakCertificateValidation
- --bind_ip=0.0.0.0
ports:
- "127.0.0.1:27018:27017"
volumes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ func getParameterAssertions(t *testing.T, b []byte) { //nolint:thelper

func buildInfoAssertions(t *testing.T, b []byte) { //nolint:thelper
assert.LessOrEqual(t, 1000, len(b))
assert.LessOrEqual(t, len(b), 2200)
objxM := convertToObjxMap(t, b)
assert.Equal(t, 1.0, objxM.Get("ok").Data())
assert.Equal(t, "mozjs", objxM.Get("javascriptEngine").Data())
Expand All @@ -212,7 +211,6 @@ func buildInfoAssertions(t *testing.T, b []byte) { //nolint:thelper

func getDiagnosticDataAssertions(t *testing.T, b []byte) { //nolint:thelper
assert.LessOrEqual(t, 25000, len(b))
assert.LessOrEqual(t, len(b), 110000)
objxM := convertToObjxMap(t, b)
assert.Equal(t, 1.0, objxM.Get("ok").Data())
assert.Equal(t, 1.0, objxM.Get("data.serverStatus.ok").Data())
Expand All @@ -221,7 +219,6 @@ func getDiagnosticDataAssertions(t *testing.T, b []byte) { //nolint:thelper

func replSetGetStatusAssertionsReplicated(t *testing.T, b []byte) { //nolint:thelper
assert.LessOrEqual(t, 1000, len(b))
assert.LessOrEqual(t, len(b), 4000)
objxM := convertToObjxMap(t, b)
assert.Equal(t, 1.0, objxM.Get("ok").Data())
assert.Len(t, objxM.Get("members").Data(), 2)
Expand Down

0 comments on commit 6efc356

Please sign in to comment.