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

kubelet: clean up tests #9346

Merged
merged 3 commits into from Jun 19, 2015
Merged

Conversation

yifan-gu
Copy link
Contributor

@yifan-gu yifan-gu commented Jun 5, 2015

Move all fake docker related tests to dockertools. Remov unused functions.

/cc @yujuhong @vmarmol @dchen1107

@k8s-bot
Copy link

k8s-bot commented Jun 5, 2015

Can one of the admins verify that this patch is reasonable to test? (reply "ok to test", or if you trust the user, reply "add to whitelist")

If this message is too spammy, please complain to ixdy.

@k8s-bot
Copy link

k8s-bot commented Jun 10, 2015

Can one of the admins verify that this patch is reasonable to test? (reply "ok to test", or if you trust the user, reply "add to whitelist")

If this message is too spammy, please complain to ixdy.

@k8s-bot
Copy link

k8s-bot commented Jun 15, 2015

Can one of the admins verify that this patch is reasonable to test? (reply "ok to test", or if you trust the user, reply "add to whitelist")

If this message is too spammy, please complain to ixdy.

@yujuhong
Copy link
Contributor

Sorry for the delay. I was out last week and most of this week too.

@yifan-gu, thanks for fixing the tests! The PR looks good to me, but needs to be rebased.

@yifan-gu yifan-gu force-pushed the cleanup_kubelet_tests branch 2 times, most recently from 4a2f515 to 5d027b5 Compare June 18, 2015 20:44
@yifan-gu
Copy link
Contributor Author

@yujuhong Rebased. No worries, take your time :)

@yujuhong
Copy link
Contributor

Uh....you need to rebase again :-(

@yifan-gu
Copy link
Contributor Author

Done @yujuhong

@yujuhong
Copy link
Contributor

LGTM.

@yujuhong yujuhong added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 18, 2015
@satnam6502
Copy link
Contributor

@k8s-bot ok to test

@k8s-bot
Copy link

k8s-bot commented Jun 18, 2015

GCE e2e build/test failed for commit 9d2830fb53adf0852db9370d034ae41ea6142fda.

@yujuhong
Copy link
Contributor

The e2e failures:

• Failure [84.739 seconds]
Proxy
/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/proxy.go:38
  version v1beta3
  /go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/proxy.go:36
    should proxy through a service and a pod [It]
    /go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/proxy.go:174

    path /api/v1beta3/proxy/namespaces/e2e-tests-proxy-u9g3o/pods/proxy-service-enzv6-411of:162 gave error an error on the server has prevented the request from succeeding
    path /api/v1beta3/proxy/namespaces/e2e-tests-proxy-u9g3o/services/proxy-service-enzv6:portname2 gave error an error on the server has prevented the request from succeeding

    /go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/proxy.go:172
------------------------------
[BeforeEach] PreStop
  /go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/framework.go:47
STEP: Creating a kubernetes client
>>> testContext.KubeConfig: /var/lib/jenkins/jobs/kubernetes-pull-build-test-e2e-gce/workspace/.kube/config
STEP: Building a namespace api object
INFO: Waiting up to 2m0s for service account default to be provisioned in ns e2e-tests-prestop-qb6hz
INFO: Get service account default in ns e2e-tests-prestop-qb6hz failed, ignoring for 5s: serviceaccounts "default" not found
INFO: Service account default in ns e2e-tests-prestop-qb6hz found. (5.007378849s)
STEP: Waiting for a default service account to be provisioned in namespace
INFO: Waiting up to 2m0s for service account default to be provisioned in ns e2e-tests-prestop-qb6hz
INFO: Service account default in ns e2e-tests-prestop-qb6hz found. (2.696351ms)
[It] should call prestop when killing a pod
  /go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/pre_stop.go:149
STEP: Creating server pod server in namespace e2e-tests-prestop-qb6hz
STEP: Waiting for pods to come up.
INFO: Waiting up to 5m0s for pod server                                                  status to be running
INFO: Waiting for pod server                                                  in namespace 'e2e-tests-prestop-qb6hz' status to be 'running'(found phase: "Pending", readiness: false) (5.775922ms elapsed)
INFO: Waiting for pod server                                                  in namespace 'e2e-tests-prestop-qb6hz' status to be 'running'(found phase: "Pending", readiness: false) (5.031456344s elapsed)
INFO: Found pod 'server' on node 'pull-e2e-0-minion-n05l'
STEP: Creating tester pod server in namespace e2e-tests-prestop-qb6hz
INFO: Waiting up to 5m0s for pod tester                                                  status to be running
INFO: Waiting for pod tester                                                  in namespace 'e2e-tests-prestop-qb6hz' status to be 'running'(found phase: "Pending", readiness: false) (6.115534ms elapsed)
INFO: Found pod 'tester' on node 'pull-e2e-0-minion-4dft'
STEP: Deleting pre-stop pod
INFO: Saw: {
    "Hostname": "server",
    "Sent": null,
    "Received": null,
    "Errors": null,
    "Log": [
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again."
    ],
    "StillContactingPeers": true
}
INFO: Saw: {
    "Hostname": "server",
    "Sent": null,
    "Received": null,
    "Errors": null,
    "Log": [
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again."
    ],
    "StillContactingPeers": true
}
INFO: Saw: {
    "Hostname": "server",
    "Sent": null,
    "Received": null,
    "Errors": null,
    "Log": [
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again."
    ],
    "StillContactingPeers": true
}
INFO: Saw: {
    "Hostname": "server",
    "Sent": null,
    "Received": null,
    "Errors": null,
    "Log": [
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again."
    ],
    "StillContactingPeers": true
}
INFO: Saw: {
    "Hostname": "server",
    "Sent": null,
    "Received": null,
    "Errors": null,
    "Log": [
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again."
    ],
    "StillContactingPeers": true
}
INFO: Saw: {
    "Hostname": "server",
    "Sent": null,
    "Received": null,
    "Errors": null,
    "Log": [
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again."
    ],
    "StillContactingPeers": true
}
INFO: Saw: {
    "Hostname": "server",
    "Sent": null,
    "Received": null,
    "Errors": null,
    "Log": [
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again."
    ],
    "StillContactingPeers": true
}
INFO: Saw: {
    "Hostname": "server",
    "Sent": null,
    "Received": null,
    "Errors": null,
    "Log": [
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again."
    ],
    "StillContactingPeers": true
}
INFO: Saw: {
    "Hostname": "server",
    "Sent": null,
    "Received": null,
    "Errors": null,
    "Log": [
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again."
    ],
    "StillContactingPeers": true
}
INFO: Saw: {
    "Hostname": "server",
    "Sent": null,
    "Received": null,
    "Errors": null,
    "Log": [
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again."
    ],
    "StillContactingPeers": true
}
INFO: Saw: {
    "Hostname": "server",
    "Sent": null,
    "Received": null,
    "Errors": null,
    "Log": [
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again."
    ],
    "StillContactingPeers": true
}
INFO: Saw: {
    "Hostname": "server",
    "Sent": null,
    "Received": null,
    "Errors": null,
    "Log": [
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again.",
        "Unable to read the endpoints for default/nettest: Get http://:/api/v1beta3/namespaces/default/endpoints/nettest: dial tcp: unknown port tcp/; will try again."
    ],
    "StillContactingPeers": true
}
STEP: Deleting the server pod
[AfterEach] PreStop
  /go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/framework.go:48
STEP: Collecting events from namespace "e2e-tests-prestop-qb6hz".
INFO: event for server: {scheduler } scheduled: Successfully assigned server to pull-e2e-0-minion-n05l
INFO: event for server: {kubelet pull-e2e-0-minion-n05l} pulled: Pod container image "gcr.io/google_containers/pause:0.8.0" already present on machine
INFO: event for server: {kubelet pull-e2e-0-minion-n05l} created: Created with docker id 8c6dffa4a56e
INFO: event for server: {kubelet pull-e2e-0-minion-n05l} started: Started with docker id 8c6dffa4a56e
INFO: event for server: {kubelet pull-e2e-0-minion-n05l} pulled: Successfully pulled image "gcr.io/google_containers/nettest:1.3"
INFO: event for server: {kubelet pull-e2e-0-minion-n05l} created: Created with docker id 8470521dd009
INFO: event for server: {kubelet pull-e2e-0-minion-n05l} started: Started with docker id 8470521dd009
INFO: event for tester: {scheduler } scheduled: Successfully assigned tester to pull-e2e-0-minion-4dft
INFO: event for tester: {kubelet pull-e2e-0-minion-4dft} pulled: Pod container image "gcr.io/google_containers/pause:0.8.0" already present on machine
INFO: event for tester: {kubelet pull-e2e-0-minion-4dft} created: Created with docker id 9d254fc9f0b6
INFO: event for tester: {kubelet pull-e2e-0-minion-4dft} started: Started with docker id 9d254fc9f0b6
INFO: event for tester: {kubelet pull-e2e-0-minion-4dft} pulled: Successfully pulled image "gcr.io/google_containers/busybox"
INFO: event for tester: {kubelet pull-e2e-0-minion-4dft} created: Created with docker id ed307153b16a
INFO: event for tester: {kubelet pull-e2e-0-minion-4dft} started: Started with docker id ed307153b16a
STEP: Destroying namespace "e2e-tests-prestop-qb6hz" for this suite.


• Failure [80.344 seconds]
PreStop
/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/pre_stop.go:150
  should call prestop when killing a pod [It]
  /go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/pre_stop.go:149

  validating pre-stop.
  Expected error:
      <*errors.errorString | 0xc20802d0f0>: {
          s: "timed out waiting for the condition",
      }
      timed out waiting for the condition
  not to have occurred

  /go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/pre_stop.go:141
------------------------------
[BeforeEach] Docker Containers
  /go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/docker_containers.go:39
>>> testContext.KubeConfig: /var/lib/jenkins/jobs/kubernetes-pull-build-test-e2e-gce/workspace/.kube/config
INFO: Waiting up to 2m0s for service account default to be provisioned in ns e2e-tests-containers-3lshn
INFO: Get service account default in ns e2e-tests-containers-3lshn failed, ignoring for 5s: serviceaccounts "default" not found
INFO: Service account default in ns e2e-tests-containers-3lshn found. (5.007584984s)
[It] should be able to override the image's default commmand (docker entrypoint)
  /go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/docker_containers.go:71
STEP: Creating a pod to test override command
INFO: Waiting up to 5m0s for pod client-containers-2cea8aa8-160c-11e5-96ca-42010af07603  status to be success or failure
INFO: No Status.Info for container 'test-container' in pod 'client-containers-2cea8aa8-160c-11e5-96ca-42010af07603' yet
INFO: Waiting for pod client-containers-2cea8aa8-160c-11e5-96ca-42010af07603  in namespace 'e2e-tests-containers-3lshn' status to be 'success or failure'(found phase: "Pending", readiness: false) (8.541416ms elapsed)
STEP: Saw pod success
STEP: Trying to get logs from node pull-e2e-0-minion-n05l pod client-containers-2cea8aa8-160c-11e5-96ca-42010af07603 container test-container: <nil>
STEP: pod logs:[/ep-2]


[AfterEach] Docker Containers
  /go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/docker_containers.go:45

@yifan-gu
Copy link
Contributor Author

@yujuhong No idea what causes this :( This PR barely touches anything other than the tests...

@yujuhong
Copy link
Contributor

I doubt that it was caused by your PR, but e2e seemed to be passing for other PRs. I will take a look later to see what's going on...

@satnam6502
Copy link
Contributor

@k8s-bot ok to test

@k8s-bot
Copy link

k8s-bot commented Jun 19, 2015

GCE e2e build/test failed for commit 9d2830fb53adf0852db9370d034ae41ea6142fda.

Yifan Gu added 3 commits June 19, 2015 10:28
Also refactor TestPortForward() to be neutral to container runtime.
Update the fakeOptionGenerator to create the pod container directory,
so that fake docker client can see and record the termination log path.
… functions.

This cleans up the kubelet tests. Almost no docker specified tests now.
@k8s-bot
Copy link

k8s-bot commented Jun 19, 2015

GCE e2e build/test passed for commit 40e46bb.

@yujuhong
Copy link
Contributor

@yifan-gu, did you change anything in your commits?...e2e passed.

@yifan-gu
Copy link
Contributor Author

@yujuhong No, just rebased. Think there is some flakiness in the tests.

@yujuhong
Copy link
Contributor

So they are just flaky :(

satnam6502 added a commit that referenced this pull request Jun 19, 2015
@satnam6502 satnam6502 merged commit 0f55103 into kubernetes:master Jun 19, 2015
@yifan-gu yifan-gu deleted the cleanup_kubelet_tests branch June 19, 2015 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants