Unable to run testground daemon

Hey all, hoping someone can point out where I’m going wrong when following the testground Getting Started guide.

I’ve got the Docker & Go pre-reqs already in place, so I’ve cloned and ran make install from the latest upstream master, all seems fine. Next step though is $ testground daemon as per here but I keep getting Unknown command testground.

Some extra info:

  • Im on macOS 10.15.4, but replicated this on an Ubuntu 18.04 VM
  • I’m using fish shell, but tried it in zsh and bash - get the same error in them all.
  • Tried restarting terminal
$ make install
go install .
docker build -t iptestground/testground:edge -f Dockerfile.testground .
Sending build context to Docker daemon  545.3kB
Step 1/12 : ARG GO_VERSION=1.14
Step 2/12 : FROM golang:${GO_VERSION}-buster
 ---> 7e5e8028e8ec
Step 3/12 : COPY /go.mod /go.mod
 ---> Using cache
 ---> 2b86ea4268c2
Step 4/12 : RUN cd / && go mod download
 ---> Using cache
 ---> df87a36beb65
Step 5/12 : COPY . /
 ---> 7ac95cc3494c
Step 6/12 : RUN cd / && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o testground
 ---> Running in c67ea93029f9
Removing intermediate container c67ea93029f9
 ---> 23596bc02480
Step 7/12 : FROM golang:${GO_VERSION}-buster
 ---> 7e5e8028e8ec
Step 8/12 : RUN mkdir -p /usr/local/bin
 ---> Using cache
 ---> 22658b3f2c8a
Step 9/12 : COPY --from=0 /testground /usr/local/bin/testground
 ---> 4c65d406ee49
Step 10/12 : ENV PATH="/usr/local/go/bin:/usr/local/bin:${PATH}"
 ---> Running in 521bcf049c8a
Removing intermediate container 521bcf049c8a
 ---> 099a920a26d4
Step 11/12 : EXPOSE 8082
 ---> Running in b9658ab8bf75
Removing intermediate container b9658ab8bf75
 ---> d060db49b386
Step 12/12 : ENTRYPOINT [ "/usr/local/bin/testground", "--vv", "daemon" ]
 ---> Running in 775dce5ad9ab
Removing intermediate container 775dce5ad9ab
 ---> 616ae3b752f4
Successfully built 616ae3b752f4
Successfully tagged iptestground/testground:edge
docker build -t iptestground/sidecar:edge -f Dockerfile.sidecar .
Sending build context to Docker daemon  545.3kB
Step 1/13 : ARG GO_VERSION=1.14
Step 2/13 : FROM golang:${GO_VERSION}-buster
 ---> 7e5e8028e8ec
Step 3/13 : COPY /go.mod /go.mod
 ---> Using cache
 ---> 2b86ea4268c2
Step 4/13 : RUN cd / && go mod download
 ---> Using cache
 ---> df87a36beb65
Step 5/13 : COPY . /
 ---> Using cache
 ---> 7ac95cc3494c
Step 6/13 : RUN cd / && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o testground
 ---> Using cache
 ---> 23596bc02480
Step 7/13 : FROM debian:buster
 ---> 5971ee6076a0
Step 8/13 : RUN apt update && apt install -y iptables
 ---> Using cache
 ---> b454028d0900
Step 9/13 : RUN mkdir -p /usr/local/bin
 ---> Using cache
 ---> 114bc5238ac7
Step 10/13 : COPY --from=0 /testground /usr/local/bin/testground
 ---> 4d5032ef5b2f
Step 11/13 : ENV PATH="/usr/local/bin:${PATH}"
 ---> Running in df04b9b8c6d5
Removing intermediate container df04b9b8c6d5
 ---> 61650ede0888
Step 12/13 : EXPOSE 6060
 ---> Running in 4e9f745dd144
Removing intermediate container 4e9f745dd144
 ---> dfcba6eb5111
Step 13/13 : ENTRYPOINT [ "/usr/local/bin/testground" ]
 ---> Running in 58642bb8af41
Removing intermediate container 58642bb8af41
 ---> 231f53cb9e0e
Successfully built 231f53cb9e0e
Successfully tagged iptestground/sidecar:edge

$ testground daemon
fish: Unknown command testground

Any suggestions?

You need to add $GOPATH/bin (probably ~/go/bin) to your $PATH. That’s where testground is installed.

1 Like