Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
docker: Run tests in parallel
Browse files Browse the repository at this point in the history
Most of our docker tests can be executed in parallel.
Use the `ginkgo -p` option to achieve this.
The ones that cannot be run in parallel are now tagged in
the test name as [Serial Test] to run them after we run
the tests that can be run in parallel.

Fixes: #1256.

Signed-off-by: Salvador Fuentes <[email protected]>
  • Loading branch information
chavafg committed Feb 28, 2019
1 parent 54e02fb commit 93ffb32
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@ docker: ginkgo
ifeq ($(RUNTIME),)
$(error RUNTIME is not set)
else
./ginkgo -v -focus "${FOCUS}" -skip "${SKIP}" ./integration/docker/ -- -runtime=${RUNTIME} -timeout=${TIMEOUT}
# Run tests in parallel, skip tests that need to be run serialized
./ginkgo -p -v -focus "${FOCUS}" -skip "${SKIP}" -skip "\[Serial Test\]" \
./integration/docker/ -- -runtime=${RUNTIME} -timeout=${TIMEOUT}
# Now run serialized tests
./ginkgo -v -focus "${FOCUS}" -focus "\[Serial Test\]" -skip "${SKIP}" \
./integration/docker/ -- -runtime=${RUNTIME} -timeout=${TIMEOUT}
bash sanity/check_sanity.sh
endif

Expand Down
4 changes: 2 additions & 2 deletions integration/docker/cp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ var _ = Describe("docker cp", func() {
})
})

var _ = Describe("docker cp with volume attached", func() {
var _ = Describe("[Serial Test] docker cp with volume attached", func() {
var (
id string
exitCode int
Expand Down Expand Up @@ -102,7 +102,7 @@ var _ = Describe("docker cp with volume attached", func() {
})
})

var _ = Describe("docker cp with volume", func() {
var _ = Describe("[Serial Test] docker cp with volume", func() {
var (
id string
exitCode int
Expand Down
2 changes: 1 addition & 1 deletion integration/docker/volume_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
. "github.com/onsi/gomega"
)

var _ = Describe("docker volume", func() {
var _ = Describe("[Serial Test] docker volume", func() {
var (
args []string
id string = randomDockerName()
Expand Down

0 comments on commit 93ffb32

Please sign in to comment.