feat(pre-deploy): add support for x-pre_deploy extension in Compose + e2e test

This commit is contained in:
Pasha Sviderski
2026-04-08 19:16:42 +10:00
parent 772b31b57f
commit 0e820f9c52
13 changed files with 371 additions and 4 deletions
+7
View File
@@ -208,6 +208,13 @@ func TestServiceSpecFromCompose(t *testing.T) {
Placement: api.Placement{
Machines: []string{"machine-1", "machine-2"},
},
PreDeploy: &api.PreDeployHook{
Command: []string{"sh", "-c", "migrate"},
Env: api.EnvVars{"DB_HOST": "localhost"},
Privileged: new(false),
Timeout: new(2*time.Minute + 30*time.Second),
User: "root",
},
Replicas: 3,
UpdateConfig: api.UpdateConfig{
Order: api.UpdateOrderStopFirst,