MCPcopy
hub / github.com/docker/compose / TestCheckWarningXInitialSyn

Function TestCheckWarningXInitialSyn

pkg/e2e/watch_test.go:487–509  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

485}
486
487func TestCheckWarningXInitialSyn(t *testing.T) {
488 c := NewCLI(t)
489 const projectName = "test_watch_warn_initial_syn"
490
491 defer c.cleanupWithDown(t, projectName)
492
493 tmpdir := t.TempDir()
494 composeFilePath := filepath.Join(tmpdir, "compose.yaml")
495 CopyFile(t, filepath.Join("fixtures", "watch", "x-initialSync.yaml"), composeFilePath)
496 cmd := c.NewDockerComposeCmd(t, "-p", projectName, "-f", composeFilePath, "--verbose", "up", "--watch")
497 buffer := bytes.NewBuffer(nil)
498 cmd.Stdout = buffer
499 watch := icmd.StartCmd(cmd)
500
501 poll.WaitOn(t, func(l poll.LogT) poll.Result {
502 if strings.Contains(watch.Combined(), "x-initialSync is DEPRECATED, please use the official `initial_sync` attribute") {
503 return poll.Success()
504 }
505 return poll.Continue("%v", watch.Stdout())
506 })
507
508 c.RunDockerComposeCmdNoCheck(t, "-p", projectName, "kill", "-s", "9")
509}

Callers

nothing calls this directly

Calls 6

cleanupWithDownMethod · 0.95
NewDockerComposeCmdMethod · 0.95
NewCLIFunction · 0.85
CopyFileFunction · 0.85
TempDirMethod · 0.80

Tested by

no test coverage detected