MCPcopy
hub / github.com/basecamp/once / assertContainerLogConfig

Function assertContainerLogConfig

integration/docker_test.go:946–958  ·  view source on GitHub ↗
(t *testing.T, ctx context.Context, name string)

Source from the content-addressed store, hash-verified

944}
945
946func assertContainerLogConfig(t *testing.T, ctx context.Context, name string) {
947 t.Helper()
948 c, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation())
949 require.NoError(t, err)
950 defer c.Close()
951
952 info, err := c.ContainerInspect(ctx, name)
953 require.NoError(t, err)
954
955 assert.Equal(t, "json-file", info.HostConfig.LogConfig.Type)
956 assert.Equal(t, docker.ContainerLogMaxSize, info.HostConfig.LogConfig.Config["max-size"])
957 assert.Equal(t, "1", info.HostConfig.LogConfig.Config["max-file"])
958}
959
960func countContainers(t *testing.T, ctx context.Context, prefix string) int {
961 t.Helper()

Callers 1

TestContainerLogConfigFunction · 0.85

Calls 3

EqualMethod · 0.80
ContainerInspectMethod · 0.65
CloseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…