diff --git a/agent/agents/mongodb/internal/profiler/profiler_test.go b/agent/agents/mongodb/internal/profiler/profiler_test.go index 211895f031..891abf4667 100644 --- a/agent/agents/mongodb/internal/profiler/profiler_test.go +++ b/agent/agents/mongodb/internal/profiler/profiler_test.go @@ -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:root-password@127.0.0.1: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) }) } diff --git a/agent/docker-compose.yml b/agent/docker-compose.yml index 08ca83ae29..43934865dd 100644 --- a/agent/docker-compose.yml +++ b/agent/docker-compose.yml @@ -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: diff --git a/agent/runner/actions/mongodb_query_admincommand_action_test.go b/agent/runner/actions/mongodb_query_admincommand_action_test.go index 5223d581fd..38d9afd4f6 100644 --- a/agent/runner/actions/mongodb_query_admincommand_action_test.go +++ b/agent/runner/actions/mongodb_query_admincommand_action_test.go @@ -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()) @@ -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()) @@ -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)