Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions e2e/tests/up/provider_docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,28 @@ var _ = ginkgo.Describe(
ginkgo.SpecTimeout(framework.GetTimeout()),
)

ginkgo.It(
"postCreateCommand with object syntax runs named sub-commands in parallel",
func(ctx context.Context) {
tempDir, err := dtc.setupAndUp(
ctx,
"tests/up/testdata/docker-postcreate-parallel",
)
framework.ExpectNoError(err)

// Both named postCreateCommand sub-commands run inside the
// container and write marker files to /tmp.
one, err := dtc.execSSH(ctx, tempDir, "cat /tmp/post-create-one.out")
framework.ExpectNoError(err)
gomega.Expect(strings.TrimSpace(one)).To(gomega.Equal("postCreateOne"))

two, err := dtc.execSSH(ctx, tempDir, "cat /tmp/post-create-two.out")
framework.ExpectNoError(err)
gomega.Expect(strings.TrimSpace(two)).To(gomega.Equal("postCreateTwo"))
},
ginkgo.SpecTimeout(framework.GetTimeout()),
)

ginkgo.It("IDE accessible before postAttachCommand completes", func(ctx context.Context) {
tempDir, err := setupWorkspace(
"tests/up/testdata/docker-post-attach-nonblocking",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"image": "ghcr.io/devsy-org/test-images/go:1",
"postCreateCommand": {
"write-one": "echo -n postCreateOne > /tmp/post-create-one.out",
"write-two": "echo -n postCreateTwo > /tmp/post-create-two.out"
}
}
Loading