Repository navigation
Skip registry client test if registry is not reachable - #5980
Conversation
|
@stevekuznetsov could you please take a look? |
There was a problem hiding this comment.
Can you show sample output we'll get from hack/test-integration.sh? I'm not completely comfortable with the idea of skipping these, but I don't know for sure that I'm opposed either.
There was a problem hiding this comment.
Once the jUnit integration is in we'll be able to easily see skips. This is nice.
There was a problem hiding this comment.
hack/test-integration.sh shows just ok:
$ printf "127.0.0.2 index.docker.io docker.io" >> /etc/hosts
$ ./hack/test-integration.sh '^TestRegistry'
Test test/integration -tags='integration !docker etcd' ...
Building test executable...
Starting etcd...
etcd: {"etcdserver":"2.1.1","etcdcluster":"2.1.0"}
{"message":"Internal Server Error"}
ok TestRegistryClientConnect
ok TestRegistryClientConnectPulpRegistry
ok TestRegistryClientDockerHubV2
...
I can see the skip message only when I run the tests manually:
$ go test -test.run TestRegistryClient -v ./test/integration/dockerregistryclient_test.go
=== RUN TestRegistryClientConnect
--- PASS: TestRegistryClientConnect (0.00s)
=== RUN TestRegistryClientConnectPulpRegistry
--- PASS: TestRegistryClientConnectPulpRegistry (3.71s)
=== RUN TestRegistryClientDockerHubV2
--- SKIP: TestRegistryClientDockerHubV2 (0.00s)
dockerregistryclient_test.go:48: skipping due to unreachable registry index.docker.io: Get https://index.docker.io/v2/: dial tcp 127.0.0.2:443: connection refused
=== RUN TestRegistryClientDockerHubV1
...
I'll shorten the skip message a bit.
There was a problem hiding this comment.
hack/test-integration.sh shows just ok:
You'll need to update that to indicate the skip.
|
Issues addressed. Example output: |
|
@miminar I might should have led with this. Do you see this as something we'll turn on in the merge queue (I'd probably tend towards no, but I think @bparees is the most affected) or do you see as something for your local runs. Since |
|
@miminar what about a retry on some kinds of failure instead of a skip? |
There was a problem hiding this comment.
move the skip check inside the if ${result} -eq 0... skips should qualify a 0 return code that would otherwise be reported as success, not excuse a non-zero return code
|
I don't want any "skip if unavailable" tests running in the merge queue... we need to be able to know what tests are running. I'm also concerned what skipping this test could allow into master. Do we have alternative tests we could do that don't depend on dockerhub? Do we need to move this into extended tests instead (and skip the check, so we know when it fails)? |
|
@deads2k not clear why i'm affected by this? but i agree with everything else that's been said that it's a bad idea...certainly as a default. |
My concern is a flake #5559. That's why I defaulted to skip.
@deads2k it might occasionally help.
@liggitt the problematic registry is our Moving the tests to extended seems reasonable to me. @deads2k, @bparees any objections? |
|
@deads2k Ok, rewritten. |
There was a problem hiding this comment.
heh, might need a test for the test. I can definitely see the intent, but I can't say with certainty that this fulfills the intent. @liggitt can you read it?
There was a problem hiding this comment.
:) ok, I'll split it with into few strings.Contains() tests.
Update: Done.
There was a problem hiding this comment.
return an error in this case
|
I think I'll like it after the API tweak |
Retry only for network related failures. Signed-off-by: root <[email protected]>
|
@deads2k addressed. Thanks for patience :). |
|
lgtm [merge] |
|
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/4148/) (Image: devenv-rhel7_2802) |
|
Evaluated for origin merge up to ea9de51 |
|
[Test]ing while waiting on the merge queue |
Resolves #5559