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

Function TestContainerLogConfig

integration/docker_test.go:277–299  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

275}
276
277func TestContainerLogConfig(t *testing.T) {
278 ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
279 defer cancel()
280
281 ns, err := docker.NewNamespace("once-logconfig-test")
282 require.NoError(t, err)
283 defer ns.Teardown(ctx, true)
284
285 require.NoError(t, ns.EnsureNetwork(ctx))
286 require.NoError(t, ns.Proxy().Boot(ctx, getProxyPorts(t)))
287
288 app := deployApp(t, ctx, ns, docker.ApplicationSettings{
289 Name: "logtest",
290 Image: "ghcr.io/basecamp/once-campfire:main",
291 Host: "logtest.localhost",
292 })
293
294 assertContainerLogConfig(t, ctx, "once-logconfig-test-proxy")
295
296 containerName, err := app.ContainerName(ctx)
297 require.NoError(t, err)
298 assertContainerLogConfig(t, ctx, containerName)
299}
300
301func TestBackup(t *testing.T) {
302 ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)

Callers

nothing calls this directly

Calls 9

TeardownMethod · 0.95
EnsureNetworkMethod · 0.95
ProxyMethod · 0.95
NewNamespaceFunction · 0.92
getProxyPortsFunction · 0.85
deployAppFunction · 0.85
assertContainerLogConfigFunction · 0.85
BootMethod · 0.80
ContainerNameMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…