MCPcopy
hub / github.com/yusing/godoxy / TestImplicitExcludeDatabase

Function TestImplicitExcludeDatabase

internal/route/provider/docker_test.go:473–494  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

471}
472
473func TestImplicitExcludeDatabase(t *testing.T) {
474 t.Run("mount path detection", func(t *testing.T) {
475 r, ok := makeRoutes(&container.Summary{
476 Names: dummyNames,
477 Mounts: []container.MountPoint{
478 {Destination: "/var/lib/postgresql/data"},
479 },
480 })["a"]
481 expect.True(t, ok)
482 expect.True(t, r.ShouldExclude())
483 })
484 t.Run("exposed port detection", func(t *testing.T) {
485 r, ok := makeRoutes(&container.Summary{
486 Names: dummyNames,
487 Ports: []container.Port{
488 {Type: "tcp", PrivatePort: 5432, PublicPort: 5432},
489 },
490 })["a"]
491 expect.True(t, ok)
492 expect.True(t, r.ShouldExclude())
493 })
494}

Callers

nothing calls this directly

Calls 2

makeRoutesFunction · 0.85
ShouldExcludeMethod · 0.65

Tested by

no test coverage detected