(t *testing.T)
| 471 | } |
| 472 | |
| 473 | func 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 | } |
nothing calls this directly
no test coverage detected