reg icon indicating copy to clipboard operation
reg copied to clipboard

Tests don't pass after cloning and running make test

Open marcosnils opened this issue 5 years ago • 3 comments

  1. Cloned the repo
  2. Set my docker engine to use insecure registry @ localhost:5000
  3. Run make test

Getting this:

marcos@marcos-xps:~/Projects/gopath/src/github.com/genuinetools/reg (master) (⎈ |bru1-gke:default)$ make test
+ test
body: {"stream":"Step 1/4 : FROM quay.io/coreos/clair"}
{"stream":"\n"}
{"status":"Pulling from coreos/clair","id":"latest"}
{"status":"Already exists","progressDetail":{},"id":"6c40cc604d8e"}
{"status":"Already exists","progressDetail":{},"id":"51d6d4c96fd3"}
{"status":"Already exists","progressDetail":{},"id":"945d978b4f19"}
{"status":"Already exists","progressDetail":{},"id":"74ebde557090"}
{"status":"Already exists","progressDetail":{},"id":"e6618267e614"}
{"status":"Already exists","progressDetail":{},"id":"45f1431207d0"}
{"status":"Already exists","progressDetail":{},"id":"5cc89d656c53"}
{"status":"Already exists","progressDetail":{},"id":"e2bd76ee288e"}
{"status":"Digest: sha256:ad866ba06505c3a0710c44e7e85ed863096a4fb1ba18cbe8efbe6e9ae0c5507f"}
{"status":"Status: Image is up to date for quay.io/coreos/clair:latest"}
{"stream":" ---\u003e 79f851f41934\n"}
{"stream":"Step 2/4 : RUN apk add --no-cache \tca-certificates"}
{"stream":"\n"}
{"stream":" ---\u003e Using cache\n"}
{"stream":" ---\u003e 96852205d94c\n"}
{"stream":"Step 3/4 : COPY testutils/snakeoil/cert.pem /usr/local/share/ca-certificates/clair.pem"}
{"stream":"\n"}
{"stream":" ---\u003e Using cache\n"}
{"stream":" ---\u003e 2ec626d1f95d\n"}
{"stream":"Step 4/4 : RUN cat /usr/local/share/ca-certificates/* \u003e\u003e /etc/ssl/certs/ca-certificates.crt"}
{"stream":"\n"}
{"stream":" ---\u003e Using cache\n"}
{"stream":" ---\u003e 430c8d95b3c5\n"}
{"aux":{"ID":"sha256:430c8d95b3c56c2285977e4ef182c58164e35ca829219d4bf08ba5814bd725a5"}}
{"stream":"Successfully built 430c8d95b3c5\n"}
{"stream":"Successfully tagged clair:dev\n"}

try number 0 to https://localhost:5000: Get https://localhost:5000/v2/: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "Acme Co")
sleeping for 1 second then will try again...
try number 1 to https://localhost:5000: Get https://localhost:5000/v2/: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "Acme Co")
sleeping for 1 second then will try again...
try number 2 to https://localhost:5000: Get https://localhost:5000/v2/: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "Acme Co")
sleeping for 1 second then will try again...
try number 3 to https://localhost:5000: Get https://localhost:5000/v2/: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "Acme Co")
sleeping for 1 second then will try again...
try number 4 to https://localhost:5000: Get https://localhost:5000/v2/: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "Acme Co")
sleeping for 1 second then will try again...
try number 5 to https://localhost:5000: Get https://localhost:5000/v2/: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "Acme Co")
sleeping for 1 second then will try again...
try number 6 to https://localhost:5000: Get https://localhost:5000/v2/: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "Acme Co")
sleeping for 1 second then will try again...
try number 7 to https://localhost:5000: Get https://localhost:5000/v2/: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "Acme Co")
sleeping for 1 second then will try again...
try number 8 to https://localhost:5000: Get https://localhost:5000/v2/: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "Acme Co")
sleeping for 1 second then will try again...
try number 9 to https://localhost:5000: Get https://localhost:5000/v2/: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "Acme Co")
panic: starting registry container noauth.yml failed: [WHOOPS]: maximum retries for https://localhost:5000 exceeded

goroutine 1 [running]:
github.com/genuinetools/reg.TestMain(0xc000380400)
        /home/marcos/Projects/gopath/src/github.com/genuinetools/reg/main_test.go:82 +0xdfb
main.main()
        _testmain.go:54 +0x13e
FAIL    github.com/genuinetools/reg     20.008s
?       github.com/genuinetools/reg/clair       [no test files]
?       github.com/genuinetools/reg/internal/binutils/static    [no test files]
?       github.com/genuinetools/reg/internal/binutils/templates [no test files]
=== RUN   TestParseChallenge
--- PASS: TestParseChallenge (0.00s)
=== RUN   TestParseChallengePush
--- PASS: TestParseChallengePush (0.00s)
=== RUN   TestDigestFromDockerHub
--- PASS: TestDigestFromDockerHub (4.38s)
=== RUN   TestDigestFromGCR
--- PASS: TestDigestFromGCR (1.19s)
=== RUN   TestErrBasicAuth
2019/06/04 17:00:38 registry.ping url=http://127.0.0.1:40967/v2/
2019/06/04 17:00:38 registry.token url=http://127.0.0.1:40967
--- PASS: TestErrBasicAuth (0.00s)
=== RUN   TestBothTokenAndAccessTokenWork
2019/06/04 17:00:38 registry.ping url=http://127.0.0.1:38063/v2/
2019/06/04 17:00:38 registry.token url=http://127.0.0.1:38063
2019/06/04 17:00:38 registry.ping url=http://127.0.0.1:38063/v2/
2019/06/04 17:00:38 registry.token url=http://127.0.0.1:38063
--- PASS: TestBothTokenAndAccessTokenWork (0.00s)
=== RUN   TestTokenTransportErrorHandling
--- PASS: TestTokenTransportErrorHandling (0.00s)
=== RUN   TestTokenTransportTokenDemandErr
--- PASS: TestTokenTransportTokenDemandErr (0.00s)
=== RUN   TestTokenTransportAuthLeak
--- PASS: TestTokenTransportAuthLeak (0.00s)
PASS
ok      github.com/genuinetools/reg/registry    (cached)
=== RUN   TestGetAuthConfig
No registry passed. Using registry "https://index.docker.io/v1/"
--- PASS: TestGetAuthConfig (0.00s)
=== RUN   TestGetRepoAndRef
--- PASS: TestGetRepoAndRef (0.00s)
PASS
ok      github.com/genuinetools/reg/repoutils   (cached)
?       github.com/genuinetools/reg/testutils   [no test files]
?       github.com/genuinetools/reg/version     [no test files]
basic.mk:75: recipe for target 'test' failed
make: *** [test] Error 1
marcos@marcos-xps:~/Projects/gopath/src/github.com/genuinetools/reg (master) (⎈ |bru1-gke:default)$


marcosnils avatar Jun 04 '19 20:06 marcosnils

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.76. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

issue-label-bot[bot] avatar Jun 04 '19 20:06 issue-label-bot[bot]

I think this is developer ignorance. Copying self-signed certs locally to try it out.

marcosnils avatar Jun 04 '19 20:06 marcosnils

Nope, it's definitely not straightforward to run tests. Tried running make snakeoil, generating a self-signed cert and adding it through update-ca-certficates but tests still failing. Even tried make dtest and also getting errors. :cry:

marcosnils avatar Jun 04 '19 20:06 marcosnils