Commit Graph

80 Commits (bb4fcddd1b76ed628412b0cb0daabc5a05f87790)

Author SHA1 Message Date
Davanum Srinivas 954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
k8s-ci-robot 8b36038b41
Merge pull request #68483 from pohly/e2e-refactor-pr
e2e refactor
2018-10-19 12:32:01 -07:00
Mikhail Mazurskiy 55bc668f8d
Seed math/rand in TestMain before tests are executed 2018-10-11 22:07:45 +11:00
Mikhail Mazurskiy 3a243090a5
Simplify random seed initialization
There is no need to set the time zone as the result does not
depend on it
2018-10-11 21:01:15 +11:00
Patrick Ohly 8b17db7e0c e2e: modular framework
Not all users of the E2E framework want to run cloud-provider specific
tests. By splitting out the code it becomes possible to decide in
a E2E test suite which providers are supported.

This is achieved in two ways:
- the framework calls certain functions through a provider
  interface instead of calling specific cloud provider functions
  directly
- tests that are cloud-provider specific directly import the
  new provider packages

The ingress test utilities are only needed by a few tests. Splitting
them out into a separate package makes the framework simpler for test
suites not using those tests.

Fixes: #66649
2018-10-11 11:16:11 +02:00
Jordan Liggitt ad46728158 Switch e2e_node to etcd3 2018-10-04 11:41:16 -04:00
Yuanbin.Chen f2eee3fe2a Fix kubeadm checks import error
kubeadm checks package import path exist "kubernetes/test",
So change the import path.

  * move "k8s.io/kubernetes/test/e2e_node/system" directory file
    to "k8s.io/kubernetes/cmd/kubeadm/app/util/system"
  * change system package import path
  * remove "k8s.io/kubernetes/test/e2e_node/system" directory

Issues report link:
https://github.com/kubernetes/kubeadm/issues/976

Signed-off-by: Yuanbin.Chen <cybing4@gmail.com>
2018-07-13 14:27:46 +08:00
Ryan Hitchman 8aa3ca3cbb Add a few "+build linux" tags where appropriate. 2018-02-27 13:53:32 -08:00
Dr. Stefan Schimanski 1910b5a1dd Fix code implicitly casting clientsets to getters 2017-08-06 15:30:13 +02:00
Jacob Simpson 29c1b81d4c Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
Yang Guo 22c9e23202 Supports customized system spec in the node conformance test and creates the GKE system spec 2017-07-14 09:39:19 -07:00
Chao Xu 60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Maru Newby 9413071ce8 e2e: Prefer kubeconfig host to default 2017-04-19 14:58:43 -07:00
Chao Xu 4f9591b1de move pkg/api/v1/ref.go and pkg/api/v1/resource.go to subpackages. move some functions in resource.go to pkg/api/v1/node and pkg/api/v1/pod 2017-04-17 11:38:11 -07:00
Random-Liu f81460e35d Change the junit file name format to `junit_image-name_id.xml`,
and make the gci image name shorter.
2017-03-09 16:47:48 -08:00
Derek McQuay 35f07095d8
kubeadm: validators pass warnings and errors
This change allows validators to pass warnings as well as errors. This
was needed because of how support for docker 1.13+ and the new EE and CE
versions is currently being handled.
2017-03-08 14:35:26 -08:00
Luca Bruno 42bdbe5c82
test/node_e2e: wire-in "container-runtime" for local tests
This commit wires-in the pre-existing `--container-runtime` flag for
local node_e2e testing.
This is needed in order to further skip docker specific testing
and validation.

Local CRI node_e2e can now be performed via
`make test-e2e-node RUNTIME=remote REMOTE=false`
which will also take care of passing the appropriate arguments to
the kubelet.
2017-02-01 20:34:51 +00:00
Clayton Coleman 469df12038
refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
NickrenREN a12dea14e0 fix redundant alias clientset 2017-01-12 10:21:05 +08:00
Kubernetes Submit Queue d8efc779ed Merge pull request #38154 from caesarxuchao/rename-release_1_5
Automatic merge from submit-queue (batch tested with PRs 38154, 38502)

Rename "release_1_5" clientset to just "clientset"

We used to keep multiple releases in the main repo. Now that [client-go](https://github.com/kubernetes/client-go) does the versioning, there is no need to keep releases in the main repo. This PR renames the "release_1_5" clientset to just "clientset", clientset development will be done in this directory.

@kubernetes/sig-api-machinery @deads2k 

```release-note
The main repository does not keep multiple releases of clientsets anymore. Please find previous releases at https://github.com/kubernetes/client-go
```
2016-12-14 14:21:51 -08:00
Chao Xu 03d8820edc rename /release_1_5 to /clientset 2016-12-14 12:39:48 -08:00
Random-Liu b7ec229e2c Add run kubelet mode. 2016-12-13 19:08:55 -08:00
Kubernetes Submit Queue 2fab199390 Merge pull request #36334 from luxas/add_preflight
Automatic merge from submit-queue

Add the system verification test to the kubeadm preflight checks

And refactor the system verification test to accept to write to a specific writer in order to customize the output

This PR is targeting v1.5, PTAL
cc @Random-Liu @dchen1107 @kubernetes/sig-cluster-lifecycle
2016-12-01 04:52:07 -08:00
Pengfei Ni f584ed4398 Fix package aliases to follow golang convention 2016-11-30 15:40:50 +08:00
Chao Xu 29400ac195 test/e2e_node 2016-11-23 15:53:09 -08:00
Random-Liu 090809d8ad Remove dependency on kubelet related flags. 2016-11-17 10:17:32 -08:00
Lucas Käldström dacec687a4 Add a reporter to the system verification check 2016-11-12 16:36:40 +02:00
Random-Liu 1c70c899f7 Get node name from node object. 2016-11-10 14:25:50 -08:00
Kubernetes Submit Queue 0df6384770 Merge pull request #31093 from Random-Liu/containerize-node-e2e-test
Automatic merge from submit-queue

Node Conformance Test: Containerize the node e2e test

For #30122, #30174.
Based on #32427, #32454.

**Please only review the last 3 commits.**

This PR packages the node e2e test into a docker image:
- 1st commit: Add `NodeConformance` flag in the node e2e framework to avoid starting kubelet and collecting system logs. We do this because:
  - There are all kinds of ways to manage kubelet and system logs, for different situation we need to mount different things into the container, run different commands. It is hard and unnecessary to handle the complexity inside the test suite.
- 2nd commit: Remove all `sudo` in the test container. We do this because:
  - In most container, there is no `sudo` command, and there is no need to use `sudo` inside the container.
  - It introduces some complexity to use `sudo` inside the test. (https://github.com/kubernetes/kubernetes/issues/29211, https://github.com/kubernetes/kubernetes/issues/26748) In fact we just need to run the test suite with `sudo`.
- 3rd commit: Package the test into a docker container with corresponding `Makefile` and `Dockerfile`. We also added a `run_test.sh` script to start kubelet and run the test container. The script is only for demonstration purpose and we'll also use the script in our node e2e framework. In the future, we should update the script to start kubelet in production way (maybe with `systemd` or `supervisord`).

@dchen1107 @vishh 
/cc @kubernetes/sig-node @kubernetes/sig-testing



**Release note**:

<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->

``` release-note
Release alpha version node test container gcr.io/google_containers/node-test-ARCH:0.1 for users to verify their node setup.
```
2016-11-07 23:41:25 -08:00
Random-Liu 9345e12bc9 Add Dockerfile and Makefile to containerize node conformance test. 2016-11-07 15:27:53 -08:00
Random-Liu 919935beec Remove sudo in test suite and run test with sudo. 2016-11-07 15:27:53 -08:00
Yu-Ju Hong dcce768a3e Rename experimental-runtime-integration-type to experimental-cri 2016-11-07 11:29:24 -08:00
Random-Liu a5fdf3850c Add system verification. 2016-11-03 20:37:18 -07:00
Random-Liu f501acebab Add the monitorParent option when starting services, and set
monitorParent to false when stop-services=false.
2016-09-24 19:45:19 -07:00
Random-Liu ae031634e4 Add CRI Validation test. The test run non-flaky, non-serial test against
Kubernetes HEAD and docker v1.11.2 with CRI enabled.
2016-09-20 12:18:07 -07:00
Random-Liu ed411c9042 Add image white list, images in white list will be prepulled, and
only images in white list could be used in the test. Currently only
enabled in node e2e test.
2016-09-19 14:39:23 -07:00
Random-Liu afb780d4ee Move utilities into different packages. Add local and remove runner. 2016-08-24 20:18:45 -07:00
Kubernetes Submit Queue 5645ca749b Merge pull request #30941 from Random-Liu/remove-fatal-in-e2e-suite
Automatic merge from submit-queue

Node E2E: Remove fatal error in e2e_node_suite_test.go

Addresses https://github.com/kubernetes/kubernetes/issues/30779#issuecomment-240532190.

Currently we run node e2e test in parallel, and ginkgo makes sure that we only initialize test framework in the first test node.
However, because we throw out some fatal error during the initialization. Once there is an fatal error, the first test node will die immediately without reporting any error, and the other nodes will exit because the first node is gone with meaningless error.

If kubelet start fails, we'll get something like:
```
------------------------------
Failure [132.485 seconds]
[BeforeSuite] BeforeSuite 
/usr/local/google/home/lantaol/workspace/src/k8s.io/kubernetes/test/e2e_node/e2e_node_suite_test.go:138

  BeforeSuite on Node 1 failed

  /usr/local/google/home/lantaol/workspace/src/k8s.io/kubernetes/test/e2e_node/e2e_node_suite_test.go:138
------------------------------
......
------------------------------
Failure [132.465 seconds]
[BeforeSuite] BeforeSuite 
/usr/local/google/home/lantaol/workspace/src/k8s.io/kubernetes/test/e2e_node/e2e_node_suite_test.go:138

  BeforeSuite on Node 1 failed

  /usr/local/google/home/lantaol/workspace/src/k8s.io/kubernetes/test/e2e_node/e2e_node_suite_test.go:138
```

This PR replaces these fatal errors with gomega assertion, with this PR, we'll get:
```
Failure [132.482 seconds]
[BeforeSuite] BeforeSuite 
/usr/local/google/home/lantaol/workspace/src/k8s.io/kubernetes/test/e2e_node/e2e_node_suite_test.go:138

  should be able to start node services.
  Expected success, but got an error:
      <*errors.errorString | 0xc8203351b0>: {
          s: "failed to run server start command \"/tmp/ginkgo869068712/e2e_node.test --run-services-mode --server-start-timeout 2m0s --report-dir  --node-name lantaol0.mtv.corp.google.com --disable-kubenet=true --cgroups-per-qos=false --manifest-path /tmp/node-e2e-pod221291440 --eviction-hard memory.available<250Mi\": exit status 255",
      }
      failed to run server start command "/tmp/ginkgo869068712/e2e_node.test --run-services-mode --server-start-timeout 2m0s --report-dir  --node-name lantaol0.mtv.corp.google.com --disable-kubenet=true --cgroups-per-qos=false --manifest-path /tmp/node-e2e-pod221291440 --eviction-hard memory.available<250Mi": exit status 255

  /usr/local/google/home/lantaol/workspace/src/k8s.io/kubernetes/test/e2e_node/e2e_node_suite_test.go:117
------------------------------
Failure [132.485 seconds]
[BeforeSuite] BeforeSuite 
/usr/local/google/home/lantaol/workspace/src/k8s.io/kubernetes/test/e2e_node/e2e_node_suite_test.go:138

  BeforeSuite on Node 1 failed

  /usr/local/google/home/lantaol/workspace/src/k8s.io/kubernetes/test/e2e_node/e2e_node_suite_test.go:138
------------------------------
......
------------------------------
Failure [132.465 seconds]
[BeforeSuite] BeforeSuite 
/usr/local/google/home/lantaol/workspace/src/k8s.io/kubernetes/test/e2e_node/e2e_node_suite_test.go:138

  BeforeSuite on Node 1 failed

  /usr/local/google/home/lantaol/workspace/src/k8s.io/kubernetes/test/e2e_node/e2e_node_suite_test.go:138
```

This is much more informative.

/cc @kubernetes/sig-node
2016-08-21 18:21:22 -07:00
Random-Liu cb760a6ed4 Wait for node ready before the node e2e test started. 2016-08-20 17:54:23 -07:00
Random-Liu 35aad1593f Remove fatal error in e2e_node_suite_test.go 2016-08-18 16:03:02 -07:00
Random-Liu 90eb1f6de7 Move namespace controller into e2e services. 2016-08-18 02:18:07 -07:00
Kubernetes Submit Queue 457a151fdb Merge pull request #30116 from Random-Liu/start-e2e-services-in-separate-process
Automatic merge from submit-queue

Node Conformance Test: Start e2e services in a separate process

For https://github.com/kubernetes/kubernetes/issues/30122.

This is the first step of https://github.com/kubernetes/kubernetes/issues/30174.

This PR added a `start-services-only` mode in the test suite, and start all e2e services in a separate process by run the test binary again in `start-services-only` mode.
2016-08-17 00:13:05 -07:00
Random-Liu 1c5bd5540e Stop throwing fatal error in buildGo to fix vm leak. 2016-08-16 18:12:21 -07:00
Random-Liu 3910a66bb5 Add run-services-mode option, and start e2e services in a separate
process.
2016-08-15 14:45:01 -07:00
Kubernetes Submit Queue 4d70d9f3de Merge pull request #30114 from Random-Liu/use-framework-report-dir
Automatic merge from submit-queue

Use report-dir in test framework instead.

We already have `report-dir` option in framework test context.
The node e2e framework should use it as well.

/cc @ronnielai
2016-08-05 23:31:28 -07:00
Kubernetes Submit Queue ea00445069 Merge pull request #29863 from ronnielai/system-test1
Automatic merge from submit-queue

Added an node e2e test for pod evictions due to disk pressure.

#29800
2016-08-05 21:34:11 -07:00
Ron Lai adf6b6ddf0 Added an node e2e test for pod evictions due to disk pressure. 2016-08-05 17:53:06 -07:00
Kubernetes Submit Queue d781225ac8 Merge pull request #30041 from Random-Liu/fix-node-name-in-node-e2e
Automatic merge from submit-queue

Node E2E: Move the node name initialization to first function of SynchronizedBeforeEach

Currently, we start e2e services in the first function of `SynchronizedBeforeEach` to make sure that we only start them once even we are running test in parallel test nodes.

However, e2e services require `NodeName`, but we initialize `NodeName` in the second function.

This PR moved the initialization logic into the first function, and shared the node name with all test nodes via the `SharedContext`.
2016-08-05 01:28:39 -07:00
Random-Liu 00b405d7e4 Use report-dir in test framework instead. 2016-08-04 23:40:17 -07:00