Commit Graph

944 Commits

Author SHA1 Message Date
Kenichi Omichi
c586d8837a Move GetClusterZones() to e2enode 2020-03-10 18:16:54 +00:00
Kenichi Omichi
19566b9c9f Remove unused E2ETestNodePreparer and functions
Since 59533f0cd1 E2ETestNodePreparer
and the related functions have been unused.
This removes them for cleanup.
2020-03-10 17:32:26 +00:00
drfish
f4da086cbe Move resource methods from e2e fw to e2e resource fw 2020-03-08 15:27:49 +08:00
Mike Danese
76f8594378 more artisanal fixes
Most of these could have been refactored automatically but it wouldn't
have been uglier. The unsophisticated tooling left lots of unnecessary
struct -> pointer -> struct transitions.
2020-03-05 14:59:47 -08:00
Mike Danese
c58e69ec79 automated refactor 2020-03-05 14:59:46 -08:00
tanjunchen
119f4df9c5 test/e2e/framework:remove unused code and move const 2020-02-17 23:31:50 +08:00
Kubernetes Prow Robot
d462f80d1b
Merge pull request #88065 from tanjunchen/remove-TODO20200212
test/e2e/framework/:remove TODO and use framework.SingleCallTimeout
2020-02-14 13:11:42 -08:00
Kubernetes Prow Robot
4a45ae3236
Merge pull request #87645 from fromanirh/topomgr-e2e-tests
e2e-topology-manager: single-NUMA-node test
2020-02-14 08:06:19 -08:00
Matthew Wong
ef8627c95e Construct http Request using http.NewRequest 2020-02-13 23:14:42 +00:00
tanjunchen
efec7e64ce remove TODO and use framework.SingleCallTimeout 2020-02-14 01:12:46 +08:00
tanjunchen
15bc88785a test/e2e/framework/util.go:make function LookForString private 2020-02-13 20:29:27 +08:00
Matthew Wong
c048fb19fc Initialize http Request Header before RoundTrip to avoid panic 2020-02-12 06:55:37 +00:00
Francesco Romani
cd7e3d626c e2e: topomgr: add test infra
This patch all the testing infra and utilities needed
to run e2e topology manager tests. This include setup
a guaranteed pod which needs some devices.

The simplest real device available for the purpose
are the SRIOV devices, hence we use them.

This patch pulls the SRIOV device plugin from
the official, yet external, repository.
We do it as close as possible for the nvidia GPU plugin.

This patch also performs minor refactoring for some
test framework utilities, needed to support the new
e2e tests.

Finally, we add an empty e2e topology manager test,
to be completed by the next patch.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-10 22:47:53 +01:00
Kubernetes Prow Robot
09b13aec37
Merge pull request #87947 from tanjunchen/remove-TODO-and-unused-code
remove TODO and unused code
2020-02-09 00:19:52 -08:00
Mike Danese
25651408ae generated: run refactor 2020-02-08 12:30:21 -05:00
tanjunchen
364c6f1173 remove TODO and unused code 2020-02-09 00:38:16 +08:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
tanjunchen
7ff3a1f8db test/e2e/framework: remove skip.go and use e2eskipper subpackage 2020-02-01 01:18:48 +08:00
Mike Danese
d55d6175f8 refactor 2020-01-29 08:50:45 -08:00
tanjunchen
ecfe31b890 /test/e2e/framework:remove TODO in test/e2e/framework/util.go 2020-01-24 23:56:16 +08:00
Jiaying Zhang
3698a2540d In test framework LoadConfig(), use CurrentContext.Server for TestContext.Host
if it is unset. Otherwise, kubectl exec through http/kubectl proxy tests in
test/e2e/kubectl/kubectl.go would fail with "--host variable must be set to
the full URI to the api server on e2e run" error.
With this change, running the following tests can now pass:
$ e2e.test --kubeconfig=xxx --ginkgo.focus="should support exec through"
2020-01-16 17:57:21 -08:00
tanjunchen
2371c58a73 remove unused code test/e2e/framework/google_compute.go 2020-01-03 19:04:28 +08:00
danielqsj
fc738cbb1d unify alias of api errors under test 2019-12-26 16:40:45 +08:00
hwdef
d45107a00d test/e2e: move funcs from test/e2e/pod to other folders 2019-12-16 11:58:49 +08:00
MorrisLaw
b85adbf1fd moved WriteFileViaContainer and ReadFileViaContainer to kubectl_utils 2019-12-04 20:31:57 +00:00
MorrisLaw
cd8da67b03 move KubectlCmd out of utils into its own package 2019-12-04 20:30:43 +00:00
SataQiu
50bc528a7e e2e: move LogFailedContainers out of e2e test framework util.go 2019-11-15 10:21:26 +08:00
Kubernetes Prow Robot
97225e2742
Merge pull request #85230 from oomichi/add-todo-issue81245
Add TODOs for removing invalid e2e dependencies
2019-11-14 13:31:41 -08:00
Kubernetes Prow Robot
c98d9b6fab
Merge pull request #85149 from oomichi/move-util-4
Move functions from e2e/framework/util.go Part-4
2019-11-13 20:01:58 -08:00
Kenichi Omichi
8f32ee183f Add TODOs for removing invalid e2e dependencies
The e2e core framework and subpackages of e2e framework are defined.
The subpackages can import the core framework, but the core framework
should not import the subpackages. We've defined this dependency rule
after circular depencency issue happened.
This adds TODOs to understand what we should in this rule.
2019-11-13 19:34:08 +00:00
Kenichi Omichi
74f68dfbce Move functions from e2e/framework/util.go Part-4
This is the last PR which moves functions from e2e/framework/util.go

- WaitForServiceWithSelector: Moved to e2e/cloud/gcp
- WaitForStatefulSetReplicasReady: Moved to e2e/storage
- WaitForRCToStabilize: Moved to e2e/kubectl
- CheckInvariants: Moved to e2e/common
- ContainerInitInvariant: Moved to e2e/common
- DumpEventsInNamespace: Renamed to local function
- WaitForDaemonSets: Moved to e2e/e2e.go
2019-11-12 19:25:23 +00:00
Kubernetes Prow Robot
6b642dae87
Merge pull request #84837 from justinsb/fix_get_kubelet_pods
e2e: Fix error where pods not logged
2019-11-12 10:23:28 -08:00
Kubernetes Prow Robot
afac2ca6a5
Merge pull request #85008 from oomichi/move-utils-3
Move functions from e2e/framework/util.go Part-3
2019-11-09 15:29:39 -08:00
Kenichi Omichi
94211f1839 Move functions from e2e framework util.go
The following functions are called at some specific places only,
so this moves these functions to the places and makes them local.

- WaitForPersistentVolumeClaimDeleted: Moved to e2e storage
- PrintSummaries: Moved to e2e framework.go
- GetHostExternalAddress: Moved to e2e node
- WaitForMasters: Moved to e2e cloud gcp
- WaitForApiserverUp: Moved to e2e network
- WaitForKubeletUp: Moved to e2e storage vsphere
2019-11-08 19:25:16 +00:00
Kenichi Omichi
5381f74641 Remove unused function from e2e framework util.go
The util.go file is so huge, it is better to make it small and simple
as possible for the maintenance.
This removes the following unused function:

- WaitForNodeHasTaintOrNot: Unused since 7e1794dcb1
2019-11-08 17:47:28 +00:00
Kubernetes Prow Robot
3ee195f0e9
Merge pull request #81431 from andrewsykim/ga-node-topology
Promote Node Zone/Region Topology Labels to GA
2019-11-07 22:00:20 -08:00
Kubernetes Prow Robot
496d69ee16
Merge pull request #84868 from oomichi/move-e2e-util-2
Move functions from e2e/framework/util.go Part-2
2019-11-07 19:20:19 -08:00
Andrew Sy Kim
349749644f test/e2e: check both beta and zone label for getting cluster zone
Signed-off-by: Andrew Sy Kim <kiman@vmware.com>
2019-11-07 21:22:05 -05:00
Kubernetes Prow Robot
0bf790b99f
Merge pull request #84806 from damemi/waitforstablecluster
Update WaitForStableCluster to wait for only system pods to exist
2019-11-07 13:28:04 -08:00
Mike Dame
a19d83494f Update e2e framework WaitForStableCluster function
Move WaitForStable cluster to test/e2e/scheduling and update it to wait for only system pods to be ready in a stable cluster.
2019-11-07 11:32:46 -05:00
Justin SB
5031a2a049
e2e: Fix error where pods not logged
This was changed recently in #84640, but result must be pre-populated.

Example error:

`Nov  6 00:18:05.296: INFO: Unable to retrieve kubelet pods for node master-us-central1-c-t81q: expected pointer, but got nil`
2019-11-06 23:45:35 -05:00
SataQiu
f4ffca8e8b e2e: remove unused KubectlVersion function from framework/util 2019-11-07 11:18:58 +08:00
Kubernetes Prow Robot
7f441dc1c3
Merge pull request #84600 from jsafrane/e2e-log-initcontainers
Grab init containers logs in e2e tests
2019-11-06 15:34:03 -08:00
Kubernetes Prow Robot
d5fbc1126b
Merge pull request #84471 from oomichi/move-e2e-util
Move functions from e2e/framework/util.go
2019-11-05 22:17:59 -08:00
Kenichi Omichi
eb9d1cb5cc Move functions from e2e/framework/util.go Part-2
This PR moves functions from test/e2e/framework.util.go for making e2e
core framework small and simple:

- RestartKubeProxy: Moved to e2e network package
- CheckConnectivityToHost: Moved to e2e network package
- RemoveAvoidPodsOffNode: Move to e2e scheduling package
- AddOrUpdateAvoidPodOnNode: Move to e2e scheduling package
- UpdateDaemonSetWithRetries: Move to e2e apps package
- CheckForControllerManagerHealthy: Moved to e2e storage package
- ParseKVLines: Removed because of e9345ae5f0
- AddOrUpdateLabelOnNodeAndReturnOldValue: Removed because of ff7b07c43c
2019-11-06 03:59:28 +00:00
Kubernetes Prow Robot
0e53f3f455
Merge pull request #84499 from YuikoTakada/move-suites
Move funcs of suites.go to e2e.go
2019-11-05 15:31:03 -08:00
Kubernetes Prow Robot
e52df5bcc3
Merge pull request #84725 from liggitt/e2e-useragent
Set user agent for e2e consistently
2019-11-05 11:44:40 -08:00
YuikoTakada
da89d212dd Move funcs of suites.go to e2e.go 2019-11-05 07:21:38 +00:00
Kubernetes Prow Robot
1b0caa496e
Merge pull request #84640 from clarklee92/UseFrameworkLogIn-e2e/framework/kubelet
Use log functions of core framework on test/e2e/framework/kubelet
2019-11-04 19:40:38 -08:00
Jordan Liggitt
300daa13a4 Set user agent for e2e consistently 2019-11-04 09:11:20 -05:00
clarklee92
dfa069a4bd Use log functions of core framework on test/e2e/framework/kubelet
1. move GetOneTimeResourceUsageOnNode() from test/e2e/framework/kubelet/stats.go to getOneTimeResourceUsageOnNode() in test/e2e/framework/resource_usage_gatherer.go
2. copy GetKubeletPods() from test/e2e/framework/kubelet/kubelet_pods.go to getKubeletPods() in test/e2e/framework/util.go
Signed-off-by: clarklee92 <clarklee1992@hotmail.com>
2019-11-03 00:41:22 +08:00
Kubernetes Prow Robot
567c1bb4ec
Merge pull request #84513 from ingvagabund/retryAddOrUpdateAvoidPodOnNode
test/e2e: AddOrUpdateAvoidPodOnNode/RemoveAvoidPodsOffNode: retry when conflict hit during annotation update
2019-11-01 19:59:52 -07:00
Kenichi Omichi
ca4c349096 Move functions from e2e/framework/util.go
- SimpleGET: Moved to ingress sub package of e2e framework
- PollURL: Moved to ingress sub package of e2e framework
- ProxyMode: Moved to service e2e test package
- ListNamespaceEvents: Moved to e2e_node test package
- NewE2ETestNodePreparer: Removed since 59533f0cd1
2019-11-01 17:39:29 +00:00
alejandrox1
3da66c44e8 Cleaned up skip functions from e2e framework
This patch moves skip-related functions from framework/util.go to
another file.

Signed-off-by: alejandrox1 <alarcj137@gmail.com>
2019-10-31 11:25:07 -04:00
Jan Safranek
17307c055c Grab init containers logs in e2e tests
Storage tests use initContainers + framework.TestContainerOutput and they
will benefit from logging their output in failed tests.
2019-10-31 14:58:51 +01:00
Jan Chaloupka
821220ecac test/e2e: AddOrUpdateAvoidPodOnNode/RemoveAvoidPodsOffNode: retry when conflict hit during annotation update
In case node object update fails due to revision conflict, it does not make sense to return success.
It needs to be retried so the v1.PreferAvoidPodsAnnotationKey annotation can be properly set in the next round.
2019-10-31 12:48:58 +01:00
Cheng Pan
b281d45749 Increase ClaimProvisionTimeout to 7 minutes 2019-10-23 05:40:06 +00:00
Kenichi Omichi
06d41a485c Move Initialized() to e2e framework util
The function is used at e2e framework util module only.
So this moves the function to the module for trying to remove
dependencies to subpackages from core e2e framework.
2019-10-11 22:29:03 +00:00
Dan Winship
779a842b3c Drop framework.GetReadySchedulableNodesOrDie
It is now fully replaced by e2enode.GetReadySchedulableNodes,
e2enode.GetBoundedReadySchedulableNodes, and
e2enode.GetRandomReadySchedulableNode.
2019-10-09 15:20:26 -04:00
alejandrox1
352254129b Refactored e2e-test-framework util.go
This cleans up the framework.util.go file and moves various Expect*
functions into their own file for better organization.

Signed-off-by: alejandrox1 <alarcj137@gmail.com>
2019-10-05 15:02:46 -04:00
Patrick Ohly
4620d0b2b8 e2e log: move back to framework, part II
This continues the work in
https://github.com/kubernetes/kubernetes/pull/81426 by also moving the
logger_test.go, moving the log helper code from util.go to log.go (a
more logical place, as it is only used there) and updating comments.
2019-10-01 21:30:12 +02:00
Patrick Ohly
f70c81c9f2 e2e log: consistent logging of stack backtrace and failure, part II
After merging
259bb3bef5 (diff-eb7b79470992813ea1905e96c298b47b)
ExpectEqual and some of the other wrappers logged the failure twice,
once inside the wrapper itself and once in the failure handler.

Logging the stack backtrace is useful because many assertions still
don't contain an explanation and therefore knowing where they occur is
crucial. Now all failures are logged with a "Full Stack Trace", not
just those with a wrapper. The stack is pruned to skip over wrapper
functions and removes Ginkgo internal functions to keep the stack
trace smaller.

Failures occuring in the wrappers were recorded as occuring in those
wrappers. Now the wrappers are skipped and the caller is recorded
instead.

The full stack trace recorded by Ginkgo 1.10.0 is currently off by one
entry. This needs to be fixed in Ginkgo, then the test can be updated.
2019-10-01 21:27:29 +02:00
Kubernetes Prow Robot
2d491ace8d
Merge pull request #82439 from smarterclayton/async_ns_cleanup
test/e2e: Delete test namespaces asynchronously
2019-09-30 14:35:31 -07:00
Kubernetes Prow Robot
48199d3c0f
Merge pull request #83219 from alejandrox1/framework-util-skip
Cleaned up skip* functions from framework/util.go
2019-09-30 11:47:39 -07:00
Clayton Coleman
67283da28b
test/e2e: Delete test namespaces asynchronously
Now that namespace deletion is reliable, use the suite tear down
to catch non terminated namespaces and stop waiting within each test
for deletion.

Serial tests that need a clean set of namespaces must use the
appropriate flag to control whether they wait for clean namespaces
on startup.
2019-09-27 15:58:05 -04:00
alejandrox1
f525e02e59 Cleaned up skip* functions from framework/util.go
This is an effort to clean up the framework util.go file so that it
makes more sense and it is more managable.

Signed-off-by: alejandrox1 <alarcj137@gmail.com>
2019-09-26 21:20:29 -04:00
Kenichi Omichi
6499f93266 Use log functions of core framework on [r-u]
This makes sub packages of e2e test framework to use log functions
of core framework instead for avoiding circular dependencies.
2019-09-26 18:17:10 +00:00
Kubernetes Prow Robot
aac13fc4eb
Merge pull request #82106 from oomichi/circular-kubelet
Cleanup DumpAllNamespaceInfo() in e2e test
2019-09-25 23:59:06 -07:00
Dan Winship
71b02dd422 Fix up e2enode.GetReadySchedulableNodes, replace many uses of framework.GetReadySchedulableNodesOrDie
Remove the "OrDie" from the name (since it doesn't "or die") and add
an extra check that there is at least 1 node available, since many
callers already did that themselves, and many others should have.
2019-09-24 13:03:39 -04:00
Kubernetes Prow Robot
4d18142120
Merge pull request #82998 from zouyee/lookforstring
cleanup unused function LookForStringInFile
2019-09-24 08:58:23 -07:00
Kenichi Omichi
7c23ba1b34 Copy PrettyPrintJSON to core framework
PrettyPrintJSON is most used e2emetrics function and that doesn't seem
specific for metrics. The implementation itself is generic, so it is
nice to move it to core framework for avoiding circular dependency.
2019-09-23 18:10:50 +00:00
zouyee
02ab6ad067 cleanup unused function
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2019-09-23 10:34:42 +08:00
WanLinghao
a6f5d99409 Refactor and clean up e2e framework utils. This patch handles test/e2e/framework/pv_util.go file 2019-09-18 17:57:13 +08:00
David Eads
fda9680fc3 dump namespace object in e2e when it doesn't get deleted 2019-09-17 14:51:59 -04:00
Kubernetes Prow Robot
4ab4e201aa
Merge pull request #82060 from aojea/isipv6method
Add a method to TestContext to check if is IPv6
2019-09-11 10:38:48 -07:00
Kubernetes Prow Robot
0f46a8a4c8
Merge pull request #81043 from johnSchnake/whitelistedTaints
Add new flag for whitelisting node taints
2019-09-10 20:44:46 -07:00
Sascha Grunert
c8b656db50
Fix wrong command in e2e agnhost utility function
The `Command` will cause the container process not starting correctly,
so we now use the `Args` to end up running `/agnhost pause` as intended.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-09-06 15:05:40 +02:00
John Schnake
3c53481d5c Move from regexp to csv string 2019-09-05 14:37:16 -05:00
John Schnake
8772187680 Add new flag for whitelisting node taints
Adds a new flag which allows users to specify a regexp
which will effectively whitelist certain taints and
allow the test framework to startup tests despite having
tainted nodes.

Fixes an issue where e2e tests were unable to be run
in tainted environments due to the framework waiting for
all the nodes to be schedulable without any tolerations.
2019-08-30 11:15:42 -05:00
Kenichi Omichi
da85510bd3 Reduce redundant Nodes().List() call
dumpAllNodeInfo() called Nodes().List() internally, but the function
is called from DumpAllNamespaceInfo() only and DumpAllNamespaceInfo()
calls Nodes().List() before calling dumpAllNodeInfo().
So this makes the result of Nodes().List() being passed to
dumpAllNodeInfo() then reduce a call of Nodes().List().
2019-08-28 23:10:06 +00:00
Kenichi Omichi
02a2d79bde Reduce indents of DumpAllNamespaceInfo()
During cleanup of DumpAllNamespaceInfo(), the code was a little
unreadable. This reduces the indents for the code readability.
2019-08-28 23:04:06 +00:00
Clayton Coleman
a49a554211
Move the IsMasterNode function to tests and mark it Deprecated
A future change will stop using this signal and instead use a
label selector passed on creation.
2019-08-28 11:17:27 -04:00
Antonio Ojea
45d6f08868
Add a method to TestContext to check if is IPv6 2019-08-27 15:41:10 +02:00
Antonio Ojea
766d79bbf5
Make TestContext.IPFamily global for parallel testing
it turns out that the framework.TestContext.IPFamily variable is
not available for the DNS tests if they don't run in the initial
Ginkgo node when running in parallel.

We add a function to the framework to allow us to run command
only once per each Ginkgo node parallel execution.

It also adds a method to detect if the cluster is IPv6.

The use of the framework.TestContext.IPFamily variable guarantees
consistency all over the testing because this variable is only
assigned at the beginning of the testing.
2019-08-27 12:54:52 +02:00
Kubernetes Prow Robot
f81ab5a9fc
Merge pull request #81342 from knight42/fix/kubectl-patch-scale
Refactor `kubectl scale` to patch scale subresource
2019-08-26 11:53:54 -07:00
Patrick Ohly
259bb3bef5 e2e: consistent failure logging
All failures are worth logging immediately, not just unexpected
errors. That helps understand tests that have long-running cleanup
operations with their own logging, because the failure will be visible
inside the test output.

The logging in framework.ExpectNoError also was rather poor, because
it only showed the error, but not the additional information about it.

Tests suites now should use log.Fail as Gomega failure handler instead
of ginkgowrapper.Fail. log.Fail will handle the logging for all
failures before proceeding to record the failure in Ginkgo.

Because logging is always done also after a test failure, additional
failures during cleanup are now visible. Ginkgo itself just ignores
them.
2019-08-26 12:38:35 +02:00
Kubernetes Prow Robot
8dc4b1b585
Merge pull request #80213 from bclau/tests/skips-windows-unrelated-tests
tests: Skips Windows-unrelated tests on Windows
2019-08-23 20:56:25 -07:00
Kubernetes Prow Robot
81c0febcd0
Merge pull request #81715 from SataQiu/fix-test-e2e-framework
Fix static check for test/e2e/framework
2019-08-22 23:27:55 -07:00
knight42
92c4c2ec72 test(scale): fix tests 2019-08-23 10:19:09 +08:00
Jiatong Wang
9a2ccc2c4f Dump the stacktrace while an error occurs
Signed-off-by: Jiatong Wang <wangjiatong@vmware.com>
2019-08-21 11:28:59 -07:00
SataQiu
c60377c682 fix static check for test/e2e/framework 2019-08-21 17:28:36 +08:00
Claudiu Belu
8812720148 tests: Skips Windows-unrelated tests on Windows
Skips IPv6 tests on Windows.
Skips sysctl tests on Windows.
Skips network policy tests on Windows.
Skips RunAsUser / FSGroup / file permissions related tests, as those are
not supported on Windows.
Skips the test "should preserve source pod IP for traffic thru service cluster IP"
on Windows, as it creates a Pod with HostNetwork=true, which is unsupported.

What works and what doesn't work on Windows has been documented here:
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md#windows--linux-considerations
2019-08-20 14:19:14 -07:00
Yongli Chen
68e553ae6c use agnhost image
add back ServeHostnameImage
2019-08-15 20:40:07 -07:00
Kubernetes Prow Robot
1e962072f1
Merge pull request #79909 from vinicyusmacedo/simplify-e2e
Moving e2e boilerplate to separate functions
2019-08-07 04:46:50 -07:00
Kubernetes Prow Robot
3cb2eaa4ba
Merge pull request #80953 from Moriadry/feature/package-collides
Fix error collides with imported package name
2019-08-06 23:57:42 -07:00
Kubernetes Prow Robot
345e58b434
Merge pull request #75071 from mkimuram/issue/74552e2e
Fix volume reconstruction and add e2e tests
2019-08-06 06:05:55 -07:00
moriadry
4b8080dda8 Fix error collides with imported package name
Fix error collides with imported package name

fix

fix
2019-08-06 12:20:29 +08:00
Kubernetes Prow Robot
a56f3ed0b8
Merge pull request #80706 from WanLinghao/refactor_e2e_kubelet_stats
Refactor and clean up e2e framework utils, this patch handles test/e2e/framework/kubelet_stats.go file
2019-08-05 13:36:16 -07:00
Vinicyus Macedo
0f21b692e4 Moved e2e boilerplate to framework 2019-08-05 16:23:56 -03:00
ravisantoshgudimetla
2d8a021bb1 Don't supress the node update error while logging 2019-08-01 17:43:45 -07:00
Masaki Kimura
f1d2d9d670 Move disruptive tests to testsuites and add ones for block volume 2019-08-01 20:04:10 +00:00
WanLinghao
92b0310cc5 Refactor and clean up e2e framework utils, this patch handles test/e2e/framework/kubelet_stats.go file 2019-08-01 17:40:02 +08:00
WanLinghao
e43572f02b Move pod related functions file in test/e2e/framework/util.go to its sub direcotry 2019-07-31 13:53:41 +08:00
draveness
c38ae01f8e feat: move service_util to separated package 2019-07-19 08:32:39 +08:00
Jiatong Wang
0b37152f17 Refactor and Move node related methods to framework/node package
Signed-off-by: Jiatong Wang <wangjiatong@vmware.com>
2019-07-17 22:54:15 -07:00
draveness
d3158b2c71 feat: use framework.ExpectNotEqual in e2e test 2019-07-10 21:36:26 +08:00
Kubernetes Prow Robot
cdddcf9b48
Merge pull request #71170 from atlassian/rand-cleanup2
Cleanup math/rand package usage
2019-07-01 21:33:08 -07:00
Claudiu Belu
c752ea8134 tests: Replaces images used with agnhost (part 3)
Quite a few images are only used a few times in a few tests. Thus,
the images are being centralized into the agnhost image, reducing
the number of images that have to be pulled and used.

This PR replaces the usage of the following images with agnhost:

- audit-proxy
- crd-conversion-webhook
- entrypoint-tester
- inclusterclient
- iperf
- porter
- serve-hostname
2019-06-26 13:33:55 -07:00
Kubernetes Prow Robot
bbc17310fc
Merge pull request #78922 from oomichi/add-ExpectEqual
Add ExpectEqual() to e2e framework
2019-06-25 01:14:50 -07:00
SataQiu
492c8c6f24 e2e: remove framework.Failf 2019-06-22 21:33:16 +08:00
Jorge Alarcon Ochoa
4147d727a6 Refactored runtime.Object helper functions into subpkg
Organized functions that abstract the access of
k8s.io/apimachinery/pkg/runtime.Objects into a framework subpackge.

Signed-off-by: Jorge Alarcon Ochoa <alarcj137@gmail.com>
2019-06-20 21:42:59 -04:00
Aaron Crickenberger
2a8bee4b37 add import-alias for k8s.io/api/extensions/v1beta1 2019-06-20 11:40:21 -07:00
Aaron Crickenberger
03ad7d2d6f add import-alias for k8s.io/api/batch/v1 2019-06-20 11:40:01 -07:00
Aaron Crickenberger
0aae740ede add import-alias for k8s.io/api/apps/v1 2019-06-20 11:39:40 -07:00
Kubernetes Prow Robot
ef03129821
Merge pull request #78396 from bclau/tests/reduce-to-agnhost-part-2
tests: Replaces images used with agnhost (part 2)
2019-06-19 21:10:48 -07:00
Jiatong Wang
b1c346c295 Move node related methods to framework/node package
- Add a package "node" under e2e/framework and alias e2enode;
- Rename some functions whose name have redundant string.

Signed-off-by: Jiatong Wang <wangjiatong@vmware.com>
2019-06-17 16:59:07 -07:00
Claudiu Belu
9e81f3b50b tests: Replaces images used with agnhost (part 2)
Quite a few images are only used a few times in a few tests. Thus,
the images are being centralized into the agnhost image, reducing
the number of images that have to be pulled and used.

This PR replaces the usage of the following images with agnhost:

- net
- netexec
- nettest
- webhook
2019-06-17 06:04:18 -07:00
Kenichi Omichi
66a3817d62 Add ExpectEqual() to e2e framework
Many e2e tests expect two values are the same, such check is one of
common things in tests. Now gomega.Expect(foo).To(gomega.Equal(bar))
is doing that, this adds ExpectEqual() for replacing the above call
for readable code.
In addition, this replaces under apimachinery/generated_clientset.go
as a sample.
2019-06-14 20:57:20 +00:00
Jorge Alarcon Ochoa
4969a05327 Refactored pod-related functions from framework/util.go
This a refactoring of framework/utils.go into framework/pod.

Signed-off-by: Jorge Alarcon Ochoa <alarcj137@gmail.com>
2019-05-30 09:30:26 -04:00
SataQiu
d3a902ff5b e2e refactor: cleanup Logf form framework/util 2019-05-24 16:39:46 +08:00
Mikhail Mazurskiy
4ce1fb7d40
Cleanup math/rand package usage 2019-05-24 09:25:04 +10:00
Akihito INOH
dddc6a53d4 Fix golint failures of e2e/framework/*.go
This fixes golint failures of the following files:
- test/e2e/framework/networking_utils.go
- test/e2e/framework/service_util.go
- test/e2e/framework/util.go

All golint failures in test/e2e/framework are fixed at this commit.
Remove 'test/e2e/framework' from 'hack/.golint_failures'
2019-05-14 07:04:57 +09:00
David Eads
d503cba375 improve e2e namespace dumping on failure 2019-05-10 10:11:24 -04:00
Kubernetes Prow Robot
b27fe7f4b9
Merge pull request #74314 from oomichi/add-ExpectError
Add ExpectError() to e2e test framework
2019-05-09 15:47:57 -07:00
Kenichi Omichi
436544488b Add ExpectError() to e2e test framework
There is a lot of gomega.Expect(err).To(gomega.HaveOccurred()) callers
which expect an error happens in e2e tests.
However these test code seems confusing because the code readers
need to take care of To() or NotTo() on each test scenario.
This adds ExpectError() for more readable test code.
In addition, this applies ExpectError() to e2e provisioning.go as a
sample.
2019-05-08 17:40:12 +00:00
John Schnake
338bc3ce42 Move framework ssh code to new package
The framework/ssh.go code was heavily used throughout the framework
and could be useful elsewhere but reusing those methods requires
importing all of the framework.

Extracting these methods to their own package for reuse.

Only a few methods had to be copied into this package from the
rest of the framework to avoid an import cycle.
2019-05-08 11:00:36 -05:00
Kubernetes Prow Robot
eacae8540a
Merge pull request #76508 from bclau/tests/agnhost-custom-dns-test
tests: Adds configurable pod DNS nameservers and search list test
2019-05-07 14:30:49 -07:00
danielqsj
6fc04b696c remove redundant else block 2019-05-06 13:43:33 +08:00
Claudiu Belu
a7598c791f tests: Adds configurable pod DNS nameservers and search list test
This test creates a pod with custom DNS configurations and expects
them to be set in the containers.

The test pod is using the agnhost image, which can output the container's
DNS configurations that the test checks.
2019-05-01 20:52:20 -07:00
draveness
774c15f2be refactor: move wait for endpoints to new pkg 2019-04-27 22:05:39 +08:00
Kubernetes Prow Robot
85b7323dbc
Merge pull request #76705 from atoato88/fix-golint-e2e-framework-util-go-part3
Fix golint failures of e2e/framework/util.go - part3
2019-04-23 19:08:00 -07:00
Kubernetes Prow Robot
4098347433
Merge pull request #76488 from atoato88/fix-golint-e2e-framework-util-go-part2
Fix golint failures of e2e/framework/util.go - part2
2019-04-23 14:02:12 -07:00
Kubernetes Prow Robot
56d7912939
Merge pull request #76348 from atoato88/fix-golint-e2e-framework-util-go
Fix golint failures of e2e/framework/util.go - part1
2019-04-23 14:02:01 -07:00
Akihito INOH
31046bbf52 Fix golint failures of e2e/framework/util.go - part3
This is a part of a series for fixing golint failures for util.go.
- fixes golint failures from line 2354 to line 3685 at original util.go

This fixes golint failures of the following file:
- test/e2e/framework/util.go
2019-04-24 02:16:06 +09:00
Akihito INOH
97fe60e807 Fix golint failures of e2e/framework/util.go - part4
This is a part of a series for fixing golint failures for util.go.
- fixes golint failures from line 3686 to end of file at original util.go

This fixes golint failures of the following file:
- test/e2e/framework/util.go
2019-04-20 08:47:37 +09:00
Akihito INOH
85f21c16ac Fix golint failures of e2e/framework/util.go - part2
This is a part of a series for fixing golint failures for util.go.
- fixes golint failures from line 1395 to line 2353 at original util.go

This fixes golint failures of the following file:
- test/e2e/framework/util.go

This changes following files because of change function name
in above file.
- test/e2e/apps/rc.go
- test/e2e/apps/replica_set.go
2019-04-17 19:00:12 +09:00
Akihito INOH
9d0bc4b8df Fix golint failures of e2e/framework/util.go - part1
This is a part of a series for fixing golint failures for util.go.
- fixes `should not use dot imports` about `ginkgo` and `gomega`
- fixes golint failures from top of file to line 1394 at original util.go

This fixes golint failures of the following file:
- test/e2e/framework/util.go

This changes following files because of change function name
in above file.
- test/e2e/e2e.go
- test/e2e/network/network_tiers.go
- test/e2e/network/service.go
2019-04-17 18:07:01 +09:00
Kubernetes Prow Robot
0dc281df04
Merge pull request #76631 from andrewsykim/refactor-framework-util
remove unused functions & types in test/e2e/framework/util.go
2019-04-16 10:27:44 -07:00
Matt Matejczyk
618d6771f8 Add missing node.address != "" condition in tests
It turns out to be a frequent bug that is revealed when nodes don't have
external IP addresses. In the test we assume that in such case there
won't be any addresses of type 'NodeExternalIp', which is invalid. In
such case there will be an address of type 'NodeExternalIP', but with
the empty 'Address' field.

Ref. https://github.com/kubernetes/kubernetes/issues/76374
2019-04-16 08:13:43 +02:00
Andrew Sy Kim
71e5980ad4 remove unused functions & types in test/e2e/framework/util.go
Signed-off-by: Andrew Sy Kim <kiman@vmware.com>
2019-04-15 19:21:39 -04:00
Kubernetes Prow Robot
df6ca6ab9f
Merge pull request #76156 from chardch/recreate-master-retry
Recreate nodes e2e test
2019-04-12 23:26:02 -07:00
Jiaying Zhang
8175579a0c add recreate node e2e test
Move recreate_node test to gce provider tests.
2019-04-12 16:00:19 -07:00
draveness
dee97a4e5c refactor: cleanup e2e replicaset utils 2019-04-12 01:48:10 +08:00
Andrew Sy Kim
4ac9feb7f9 test/e2e: replace legacy scheme with client-go scheme
Signed-off-by: Andrew Sy Kim <kiman@vmware.com>
2019-04-02 10:08:55 -04:00
Andrew Sy Kim
1470df7a05 remove usages of internal clientset in e2e framework
Signed-off-by: Andrew Sy Kim <kiman@vmware.com>
2019-03-28 21:13:40 -04:00
Patrick Ohly
e8a7cee43e test: remove k8s.io/apiextensions-apiserver from framework
There are two reason why this is useful:

1. less code to vendor into external users of the framework

The following dependencies become obsolete due to this change (from `dep`):

(8/23) Removed unused project github.com/grpc-ecosystem/go-grpc-prometheus
(9/23) Removed unused project github.com/coreos/etcd
(10/23) Removed unused project github.com/globalsign/mgo
(11/23) Removed unused project github.com/go-openapi/strfmt
(12/23) Removed unused project github.com/asaskevich/govalidator
(13/23) Removed unused project github.com/mitchellh/mapstructure
(14/23) Removed unused project github.com/NYTimes/gziphandler
(15/23) Removed unused project gopkg.in/natefinch/lumberjack.v2
(16/23) Removed unused project github.com/go-openapi/errors
(17/23) Removed unused project github.com/go-openapi/analysis
(18/23) Removed unused project github.com/go-openapi/runtime
(19/23) Removed unused project sigs.k8s.io/structured-merge-diff
(20/23) Removed unused project github.com/go-openapi/validate
(21/23) Removed unused project github.com/coreos/go-systemd
(22/23) Removed unused project github.com/go-openapi/loads
(23/23) Removed unused project github.com/munnerz/goautoneg

2. works around https://github.com/kubernetes/kubernetes/issues/75338
   which currently breaks vendoring

Some recent changes to crd_util.go must now be pulling in the broken
k8s.io/apiextensions-apiserver packages, because it was still working
in revision 2e90d92db9 (as demonstrated by
586ae281ac).
2019-03-13 19:05:13 +01:00
Haowei Cai
591f00e9b3 test client-side validation behavior for CRD
support version-skew testing
2019-03-05 12:22:46 -08:00
Kubernetes Prow Robot
b67126e350
Merge pull request #74113 from oomichi/use-ExpectNoError-on-e2e-framework
Use framework.ExpectNoError() instead Expect()
2019-02-19 13:42:06 -08:00
Kubernetes Prow Robot
f35b7a365e
Merge pull request #73046 from mikkeloscar/fix-e2e-websocket-https
Fix websocket e2e tests for https endpoints
2019-02-18 22:45:33 -08:00
Mikkel Oscar Lyderik Larsen
9f34d8bc79
Remove 'tlsConfig != nil' check
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2019-02-18 09:45:37 +01:00