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