diff --git a/.drone.yml b/.drone.yml index 42390bd..b89a9a1 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,6 +8,9 @@ steps: environment: SNAPSHOTS_S3_ENDPOINT: minio:9000 TEST_S3_ENDPOINT: minio:9000 + volumes: + - name: dockersock + path: /var/run commands: - go mod tidy - make test @@ -23,6 +26,16 @@ services: - /data - --console-address - :9001 +- name: docker + image: docker:dind + privileged: true + volumes: + - name: dockersock + path: /var/run + +volumes: +- name: dockersock + temp: {} --- diff --git a/Makefile b/Makefile index b8d5399..b9fdcfe 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ test: go test -v apps/*.go go test -v apps/drivers/*.go go test -v detector/*.go - # go test -v docker/*.go # Doesn't work in Drone right now + go test -v docker/*.go # Doesn't work in Drone right now build: #podman run --rm --privileged -ti -v ${shell pwd}:/srv docker.io/library/golang:1.14-stretch /bin/sh -c "cd /srv && go build" diff --git a/containers/docker_test.go b/containers/docker_test.go index 84f6b4d..ed32330 100644 --- a/containers/docker_test.go +++ b/containers/docker_test.go @@ -8,7 +8,8 @@ import ( func TestGetProcesses(t *testing.T) { driver := Driver{ - DockerSock: "unix:///run/user/1000/podman/podman.sock", + //DockerSock: "unix:///run/user/1000/podman/podman.sock", + DockerSock: "unix:///var/run/docker.sock", BindIPHTTP: "127.0.0.1", BindIPSSH: "127.0.0.1", }