diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-03-25 14:23:57 +0100 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-03-25 14:23:57 +0100 |
| commit | 1708d88ca975e11af912d10f0d793ac6ee775919 (patch) | |
| tree | e64171a5a0093d22fd11a0f3d69d11343102a3fa /ci/docker/go-test.docker | |
| parent | bd8eda82e5d08d2ca33022b0533c831303a73019 (diff) | |
Add comments and minor fixups
Diffstat (limited to 'ci/docker/go-test.docker')
| -rw-r--r-- | ci/docker/go-test.docker | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ci/docker/go-test.docker b/ci/docker/go-test.docker index 9e6ad3a..3e56f67 100644 --- a/ci/docker/go-test.docker +++ b/ci/docker/go-test.docker @@ -1,10 +1,10 @@ FROM golang:1.18 -WORKDIR /eduvpn +# This docker image is for testing the go code with go test and the needed dependencies for selenium +WORKDIR /eduvpn # Selenium dependencies - # Firefox RUN echo "deb http://deb.debian.org/debian/ unstable main contrib non-free" >> /etc/apt/sources.list.d/debian.list RUN apt-get update @@ -15,11 +15,12 @@ WORKDIR /eduvpn/go/vendor RUN wget https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux64.tar.gz RUN tar xzvf geckodriver-v0.30.0-linux64.tar.gz - ENV PATH="/eduvpn/go/vendor:$PATH" +# Set up file tree WORKDIR /eduvpn/go +# Taken from golang docker example # pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change COPY ./go.mod go.sum ./ RUN go mod download && go mod verify @@ -32,4 +33,5 @@ COPY ./src ./src # Copy selenium scripts COPY ./selenium_eduvpn.py ./selenium_eduvpn.py +# Run the tests CMD ["go", "test", "-mod=readonly", "github.com/jwijenbergh/eduvpn-common/src", "-v"] |
