diff --git a/docker/Dockerfile.testing b/docker/Dockerfile.testing index 7067381..9748c29 100644 --- a/docker/Dockerfile.testing +++ b/docker/Dockerfile.testing @@ -9,8 +9,10 @@ COPY cmd /go/src/github.com/dominicbreuker/pspy/cmd COPY internal /go/src/github.com/dominicbreuker/pspy/internal COPY vendor /go/src/github.com/dominicbreuker/pspy/vendor -# build executable +# run tests WORKDIR /go/src/github.com/dominicbreuker/pspy +RUN go test ./... +# build executable RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -ldflags '-extldflags "-static"' -o bin/pspy main.go ### Prepare integration test ### diff --git a/docker/entrypoint-testing.sh b/docker/entrypoint-testing.sh index 2776027..30a8508 100644 --- a/docker/entrypoint-testing.sh +++ b/docker/entrypoint-testing.sh @@ -1,10 +1,5 @@ #!/bin/bash -# run unit tests -echo "[+] running unit tests" -sudo /bin/sh -c 'GOPATH=/go /usr/local/go/bin/go test ./...' - -# run integration test sudo cron -f & sleep 1 sudo ps | grep cron 1>/dev/null diff --git a/internal/fswatcher/inotify/testdata/folder/.keep b/internal/fswatcher/inotify/testdata/folder/.keep new file mode 100644 index 0000000..e69de29