Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibly depriacted code in go example causes go test fail in docker image #2

Closed
Nouri-Alnahawi opened this issue Jul 22, 2019 · 2 comments

Comments

@Nouri-Alnahawi
Copy link

While building the docker image directly inside the kluster (Chapter 8 Page 158) the following error message appears:


/go-demo-2 # docker image build -t vfarcic/go-demo-2:beta .
Sending build context to Docker daemon  106.5kB
Step 1/15 : FROM golang:1.9 AS build
 ---> ef89ef5c42a9
Step 2/15 : ADD . /src
 ---> Using cache
 ---> 65c29cf1b0b7
Step 3/15 : WORKDIR /src
 ---> Using cache
 ---> 99679df1b2ef
Step 4/15 : RUN go get -d -v -t
 ---> Using cache
 ---> ea45068d5f65
Step 5/15 : RUN go test --cover -v ./... --run UnitTest
 ---> Running in 68e693711e38
# _/src
/tmp/go-build021239558/_/src/_test/_obj_test/main.go:173:9: undefined: prometheus.Handler
FAIL	_/src [build failed]
The command '/bin/sh -c go test --cover -v ./... --run UnitTest' returned a non-zero code: 2

I have looked up the issue in Go forums, and maybe the library packages pulled during the build do not support this usage of Prometheus.

Cheers

@vfarcic
Copy link
Owner

vfarcic commented Jul 23, 2019 via email

@Nouri-Alnahawi
Copy link
Author

Thank you for the quick fix. It's working now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants