mirror of https://github.com/docker/cli.git
Merge pull request #1704 from ijc/allow-passing-args-to-e2e-tests
Allow flags to be passed to e2e tests
This commit is contained in:
commit
6d59892b66
2
Makefile
2
Makefile
|
@ -12,7 +12,7 @@ clean: ## remove build artifacts
|
||||||
|
|
||||||
.PHONY: test-unit
|
.PHONY: test-unit
|
||||||
test-unit: ## run unit tests, to change the output format use: GOTESTSUM_FORMAT=(dots|short|standard-quiet|short-verbose|standard-verbose) make test-unit
|
test-unit: ## run unit tests, to change the output format use: GOTESTSUM_FORMAT=(dots|short|standard-quiet|short-verbose|standard-verbose) make test-unit
|
||||||
gotestsum -- $(shell go list ./... | grep -vE '/vendor/|/e2e/')
|
gotestsum $(TESTFLAGS) -- $${TESTDIRS:-$(shell go list ./... | grep -vE '/vendor/|/e2e/')}
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test: test-unit ## run tests
|
test: test-unit ## run tests
|
||||||
|
|
|
@ -21,7 +21,7 @@ ifeq ($(DOCKER_CLI_GO_BUILD_CACHE),y)
|
||||||
DOCKER_CLI_MOUNTS += -v "$(CACHE_VOLUME_NAME):/root/.cache/go-build"
|
DOCKER_CLI_MOUNTS += -v "$(CACHE_VOLUME_NAME):/root/.cache/go-build"
|
||||||
endif
|
endif
|
||||||
VERSION = $(shell cat VERSION)
|
VERSION = $(shell cat VERSION)
|
||||||
ENVVARS = -e VERSION=$(VERSION) -e GITCOMMIT -e PLATFORM
|
ENVVARS = -e VERSION=$(VERSION) -e GITCOMMIT -e PLATFORM -e TESTFLAGS -e TESTDIRS
|
||||||
|
|
||||||
# build docker image (dockerfiles/Dockerfile.build)
|
# build docker image (dockerfiles/Dockerfile.build)
|
||||||
.PHONY: build_docker_image
|
.PHONY: build_docker_image
|
||||||
|
@ -141,15 +141,15 @@ test-e2e: test-e2e-non-experimental test-e2e-experimental test-e2e-connhelper-ss
|
||||||
|
|
||||||
.PHONY: test-e2e-experimental
|
.PHONY: test-e2e-experimental
|
||||||
test-e2e-experimental: build_e2e_image # run experimental e2e tests
|
test-e2e-experimental: build_e2e_image # run experimental e2e tests
|
||||||
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -e DOCKERD_EXPERIMENTAL=1 $(E2E_IMAGE_NAME)
|
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock $(ENVVARS) -e DOCKERD_EXPERIMENTAL=1 $(E2E_IMAGE_NAME)
|
||||||
|
|
||||||
.PHONY: test-e2e-non-experimental
|
.PHONY: test-e2e-non-experimental
|
||||||
test-e2e-non-experimental: build_e2e_image # run non-experimental e2e tests
|
test-e2e-non-experimental: build_e2e_image # run non-experimental e2e tests
|
||||||
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock $(E2E_IMAGE_NAME)
|
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock $(ENVVARS) $(E2E_IMAGE_NAME)
|
||||||
|
|
||||||
.PHONY: test-e2e-connhelper-ssh
|
.PHONY: test-e2e-connhelper-ssh
|
||||||
test-e2e-connhelper-ssh: build_e2e_image # run experimental SSH-connection helper e2e tests
|
test-e2e-connhelper-ssh: build_e2e_image # run experimental SSH-connection helper e2e tests
|
||||||
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -e DOCKERD_EXPERIMENTAL=1 -e TEST_CONNHELPER=ssh $(E2E_IMAGE_NAME)
|
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock $(ENVVARS) -e DOCKERD_EXPERIMENTAL=1 -e TEST_CONNHELPER=ssh $(E2E_IMAGE_NAME)
|
||||||
|
|
||||||
.PHONY: help
|
.PHONY: help
|
||||||
help: ## print this help
|
help: ## print this help
|
||||||
|
|
|
@ -71,7 +71,7 @@ function runtests {
|
||||||
PATH="$PWD/build/:/usr/bin:/usr/local/bin:/usr/local/go/bin" \
|
PATH="$PWD/build/:/usr/bin:/usr/local/bin:/usr/local/go/bin" \
|
||||||
HOME="$HOME" \
|
HOME="$HOME" \
|
||||||
DOCKER_CLI_E2E_PLUGINS_EXTRA_DIRS="$PWD/build/plugins-linux-amd64" \
|
DOCKER_CLI_E2E_PLUGINS_EXTRA_DIRS="$PWD/build/plugins-linux-amd64" \
|
||||||
"$(command -v gotestsum)" -- ./e2e/... ${TESTFLAGS-}
|
"$(command -v gotestsum)" -- ${TESTDIRS:-./e2e/...} ${TESTFLAGS-}
|
||||||
}
|
}
|
||||||
|
|
||||||
export unique_id="${E2E_UNIQUE_ID:-cliendtoendsuite}"
|
export unique_id="${E2E_UNIQUE_ID:-cliendtoendsuite}"
|
||||||
|
|
Loading…
Reference in New Issue