Only mount a directory with the test binary into the container
@@ -32,15 +32,16 @@ test_containers() {
echo_header "Executing container runtime tests"
# Run the container tests, note that we also build the binaries into /tmp for the next step.
+ TEST_BIN_DIRECTORY=$(mktemp -d)
pushd ${ROOT}/tests
- GOOS=linux go test -c -o /tmp/pulumi-test-containers ${ROOT}/tests/containers/...
+ GOOS=linux go test -c -o ${TEST_BIN_DIRECTORY} ${ROOT}/tests/containers/...
popd
# Run tests _within_ the "pulumi" container, ensuring that the CLI is installed
# and working correctly.
docker run -e RUN_CONTAINER_TESTS=true \
-e PULUMI_ACCESS_TOKEN=${PULUMI_ACCESS_TOKEN} \
- --volume /tmp:/src \
+ --volume ${TEST_BIN_DIRECTORY}:/src \
--entrypoint /bin/bash \
pulumi/pulumi:latest \
-c "pip install pipenv && /src/pulumi-test-containers -test.parallel=1 -test.v -test.run TestPulumiDockerImage"
