Patrick Ohly
2f6c4f5eab
e2e: use Ginkgo context
...
All code must use the context from Ginkgo when doing API calls or polling for a
change, otherwise the code would not return immediately when the test gets
aborted.
2022-12-16 20:14:04 +01:00
Patrick Ohly
df5d84ae81
e2e: accept context from Ginkgo
...
Every ginkgo callback should return immediately when a timeout occurs or the
test run manually gets aborted with CTRL-C. To do that, they must take a ctx
parameter and pass it through to all code which might block.
This is a first automated step towards that: the additional parameter got added
with
sed -i 's/\(framework.ConformanceIt\|ginkgo.It\)\(.*\)func() {$/\1\2func(ctx context.Context) {/' \
$(git grep -l -e framework.ConformanceIt -e ginkgo.It )
$GOPATH/bin/goimports -w $(git status | grep modified: | sed -e 's/.* //')
log_test.go was left unchanged.
2022-12-10 19:50:18 +01:00
Patrick Ohly
dfdf88d4fa
e2e: adapt to moved code
...
This is the result of automatically editing source files like this:
go install golang.org/x/tools/cmd/goimports@latest
find ./test/e2e* -name "*.go" | xargs env PATH=$GOPATH/bin:$PATH ./e2e-framework-sed.sh
with e2e-framework-sed.sh containing this:
sed -i \
-e "s/\(f\|fr\|\w\w*\.[fF]\w*\)\.ExecCommandInContainer(/e2epod.ExecCommandInContainer(\1, /" \
-e "s/\(f\|fr\|\w\w*\.[fF]\w*\)\.ExecCommandInContainerWithFullOutput(/e2epod.ExecCommandInContainerWithFullOutput(\1, /" \
-e "s/\(f\|fr\|\w\w*\.[fF]\w*\)\.ExecShellInContainer(/e2epod.ExecShellInContainer(\1, /" \
-e "s/\(f\|fr\|\w\w*\.[fF]\w*\)\.ExecShellInPod(/e2epod.ExecShellInPod(\1, /" \
-e "s/\(f\|fr\|\w\w*\.[fF]\w*\)\.ExecShellInPodWithFullOutput(/e2epod.ExecShellInPodWithFullOutput(\1, /" \
-e "s/\(f\|fr\|\w\w*\.[fF]\w*\)\.ExecWithOptions(/e2epod.ExecWithOptions(\1, /" \
-e "s/\(f\|fr\|\w\w*\.[fF]\w*\)\.MatchContainerOutput(/e2eoutput.MatchContainerOutput(\1, /" \
-e "s/\(f\|fr\|\w\w*\.[fF]\w*\)\.PodClient(/e2epod.NewPodClient(\1, /" \
-e "s/\(f\|fr\|\w\w*\.[fF]\w*\)\.PodClientNS(/e2epod.PodClientNS(\1, /" \
-e "s/\(f\|fr\|\w\w*\.[fF]\w*\)\.TestContainerOutput(/e2eoutput.TestContainerOutput(\1, /" \
-e "s/\(f\|fr\|\w\w*\.[fF]\w*\)\.TestContainerOutputRegexp(/e2eoutput.TestContainerOutputRegexp(\1, /" \
-e "s/framework.AddOrUpdateLabelOnNode\b/e2enode.AddOrUpdateLabelOnNode/" \
-e "s/framework.AllNodes\b/e2edebug.AllNodes/" \
-e "s/framework.AllNodesReady\b/e2enode.AllNodesReady/" \
-e "s/framework.ContainerResourceGatherer\b/e2edebug.ContainerResourceGatherer/" \
-e "s/framework.ContainerResourceUsage\b/e2edebug.ContainerResourceUsage/" \
-e "s/framework.CreateEmptyFileOnPod\b/e2eoutput.CreateEmptyFileOnPod/" \
-e "s/framework.DefaultPodDeletionTimeout\b/e2epod.DefaultPodDeletionTimeout/" \
-e "s/framework.DumpAllNamespaceInfo\b/e2edebug.DumpAllNamespaceInfo/" \
-e "s/framework.DumpDebugInfo\b/e2eoutput.DumpDebugInfo/" \
-e "s/framework.DumpNodeDebugInfo\b/e2edebug.DumpNodeDebugInfo/" \
-e "s/framework.EtcdUpgrade\b/e2eproviders.EtcdUpgrade/" \
-e "s/framework.EventsLister\b/e2edebug.EventsLister/" \
-e "s/framework.ExecOptions\b/e2epod.ExecOptions/" \
-e "s/framework.ExpectNodeHasLabel\b/e2enode.ExpectNodeHasLabel/" \
-e "s/framework.ExpectNodeHasTaint\b/e2enode.ExpectNodeHasTaint/" \
-e "s/framework.GCEUpgradeScript\b/e2eproviders.GCEUpgradeScript/" \
-e "s/framework.ImagePrePullList\b/e2epod.ImagePrePullList/" \
-e "s/framework.KubectlBuilder\b/e2ekubectl.KubectlBuilder/" \
-e "s/framework.LocationParamGKE\b/e2eproviders.LocationParamGKE/" \
-e "s/framework.LogSizeDataTimeseries\b/e2edebug.LogSizeDataTimeseries/" \
-e "s/framework.LogSizeGatherer\b/e2edebug.LogSizeGatherer/" \
-e "s/framework.LogsSizeData\b/e2edebug.LogsSizeData/" \
-e "s/framework.LogsSizeDataSummary\b/e2edebug.LogsSizeDataSummary/" \
-e "s/framework.LogsSizeVerifier\b/e2edebug.LogsSizeVerifier/" \
-e "s/framework.LookForStringInLog\b/e2eoutput.LookForStringInLog/" \
-e "s/framework.LookForStringInPodExec\b/e2eoutput.LookForStringInPodExec/" \
-e "s/framework.LookForStringInPodExecToContainer\b/e2eoutput.LookForStringInPodExecToContainer/" \
-e "s/framework.MasterAndDNSNodes\b/e2edebug.MasterAndDNSNodes/" \
-e "s/framework.MasterNodes\b/e2edebug.MasterNodes/" \
-e "s/framework.MasterUpgradeGKE\b/e2eproviders.MasterUpgradeGKE/" \
-e "s/framework.NewKubectlCommand\b/e2ekubectl.NewKubectlCommand/" \
-e "s/framework.NewLogsVerifier\b/e2edebug.NewLogsVerifier/" \
-e "s/framework.NewNodeKiller\b/e2enode.NewNodeKiller/" \
-e "s/framework.NewResourceUsageGatherer\b/e2edebug.NewResourceUsageGatherer/" \
-e "s/framework.NodeHasTaint\b/e2enode.NodeHasTaint/" \
-e "s/framework.NodeKiller\b/e2enode.NodeKiller/" \
-e "s/framework.NodesSet\b/e2edebug.NodesSet/" \
-e "s/framework.PodClient\b/e2epod.PodClient/" \
-e "s/framework.RemoveLabelOffNode\b/e2enode.RemoveLabelOffNode/" \
-e "s/framework.ResourceConstraint\b/e2edebug.ResourceConstraint/" \
-e "s/framework.ResourceGathererOptions\b/e2edebug.ResourceGathererOptions/" \
-e "s/framework.ResourceUsagePerContainer\b/e2edebug.ResourceUsagePerContainer/" \
-e "s/framework.ResourceUsageSummary\b/e2edebug.ResourceUsageSummary/" \
-e "s/framework.RunHostCmd\b/e2eoutput.RunHostCmd/" \
-e "s/framework.RunHostCmdOrDie\b/e2eoutput.RunHostCmdOrDie/" \
-e "s/framework.RunHostCmdWithFullOutput\b/e2eoutput.RunHostCmdWithFullOutput/" \
-e "s/framework.RunHostCmdWithRetries\b/e2eoutput.RunHostCmdWithRetries/" \
-e "s/framework.RunKubectl\b/e2ekubectl.RunKubectl/" \
-e "s/framework.RunKubectlInput\b/e2ekubectl.RunKubectlInput/" \
-e "s/framework.RunKubectlOrDie\b/e2ekubectl.RunKubectlOrDie/" \
-e "s/framework.RunKubectlOrDieInput\b/e2ekubectl.RunKubectlOrDieInput/" \
-e "s/framework.RunKubectlWithFullOutput\b/e2ekubectl.RunKubectlWithFullOutput/" \
-e "s/framework.RunKubemciCmd\b/e2ekubectl.RunKubemciCmd/" \
-e "s/framework.RunKubemciWithKubeconfig\b/e2ekubectl.RunKubemciWithKubeconfig/" \
-e "s/framework.SingleContainerSummary\b/e2edebug.SingleContainerSummary/" \
-e "s/framework.SingleLogSummary\b/e2edebug.SingleLogSummary/" \
-e "s/framework.TimestampedSize\b/e2edebug.TimestampedSize/" \
-e "s/framework.WaitForAllNodesSchedulable\b/e2enode.WaitForAllNodesSchedulable/" \
-e "s/framework.WaitForSSHTunnels\b/e2enode.WaitForSSHTunnels/" \
-e "s/framework.WorkItem\b/e2edebug.WorkItem/" \
"$@"
for i in "$@"; do
# Import all sub packages and let goimports figure out which of those
# are redundant (= already imported) or not needed.
sed -i -e '/"k8s.io.kubernetes.test.e2e.framework"/a e2edebug "k8s.io/kubernetes/test/e2e/framework/debug"' "$i"
sed -i -e '/"k8s.io.kubernetes.test.e2e.framework"/a e2ekubectl "k8s.io/kubernetes/test/e2e/framework/kubectl"' "$i"
sed -i -e '/"k8s.io.kubernetes.test.e2e.framework"/a e2enode "k8s.io/kubernetes/test/e2e/framework/node"' "$i"
sed -i -e '/"k8s.io.kubernetes.test.e2e.framework"/a e2eoutput "k8s.io/kubernetes/test/e2e/framework/pod/output"' "$i"
sed -i -e '/"k8s.io.kubernetes.test.e2e.framework"/a e2epod "k8s.io/kubernetes/test/e2e/framework/pod"' "$i"
sed -i -e '/"k8s.io.kubernetes.test.e2e.framework"/a e2eproviders "k8s.io/kubernetes/test/e2e/framework/providers"' "$i"
goimports -w "$i"
done
2022-10-06 08:19:47 +02:00
Dave Chen
fd4b5b629b
Stop using the deprecated method CurrentGinkgoTestDescription
...
Besides, the using of method might lead to a `concurrent map writes`
issue per the discussion here: https://github.com/onsi/ginkgo/issues/970
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-07-08 10:46:11 +08:00
Dave Chen
857458cfa5
update ginkgo from v1 to v2 and gomega to 1.19.0
...
- update all the import statements
- run hack/pin-dependency.sh to change pinned dependency versions
- run hack/update-vendor.sh to update go.mod files and the vendor directory
- update the method signatures for custom reporters
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-07-08 10:44:46 +08:00
Kubernetes Prow Robot
b0254c8a0b
Merge pull request #108758 from fengzixu/improvement-volume-health
...
re-push "add volume kubelet_volume_stats_health_abnormal to kubelet #105585 "
2022-03-29 17:35:34 -07:00
Sergiusz Urbaniak
373c08e0c7
test/e2e/framework: configure pod security admission level for e2e tests
2022-03-28 15:42:10 +02:00
Mike Miranda
44e3280799
Increase timeout for stats check
2022-03-21 22:20:57 +00:00
Kubernetes Prow Robot
5cb6fab8f6
Merge pull request #105585 from fengzixu/improvement-volume-health
...
add volume kubelet_volume_stats_health_abnormal to kubelet
2022-03-17 01:32:38 +00:00
Maciej Borsz
aa95513982
Revert "add volume kubelet_volume_stats_health_abnormal to kubelet"
2022-03-16 13:44:09 +01:00
Kubernetes Prow Robot
1a5abe5d1f
Merge pull request #105585 from fengzixu/improvement-volume-health
...
add volume kubelet_volume_stats_health_abnormal to kubelet
2022-03-15 05:58:11 -07:00
ahrtr
fe95aa614c
io/ioutil has already been deprecated in golang 1.16, so replace all ioutil with io and os
2022-02-03 05:32:12 +08:00
Mike Miranda
c6d903eb27
Increase timeout for initial /stats/summary validation
2022-02-02 06:17:44 +00:00
Mike Miranda
99e27b0f37
Extend deadline for /stats/summary test
2022-01-26 00:07:00 +00:00
fengzixu
f202164c87
fix e2e test
2022-01-11 13:50:17 +00:00
fengzixu
ed7fd0ced5
add volumeHealth label to metrics
2022-01-11 13:50:17 +00:00
fengzixu
bab1755274
fix: correct metrics expression
2022-01-11 13:50:17 +00:00
Ciprian Hacman
a0abe5aa33
Clean up dockershim in tests
...
Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
2021-12-22 13:05:34 +02:00
Peter Hunt
76df8acb80
test: update major page fault values for summary test
...
as well as use a variable instead of a constant
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2021-11-18 09:24:41 -05:00
Giuseppe Scrivano
f23e2a8c7f
test, cgroupv2: adjust pagefaults test
...
on cgroup v2 the reported metric is recursive and it includes all the
sub cgroups.
Closes: https://github.com/kubernetes/kubernetes/issues/105301
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-10-05 18:00:57 +02:00
David Porter
3af4fe8c9b
Use pointer gomega comparison for UsageNanoCores
2021-07-22 01:08:36 -07:00
Davanum Srinivas
7fcdbbef06
Switch to github.com/coreos/go-systemd/v22 and drop older package
...
- We use the new v22 module released on May 10
- We drop the unmaintained `github.com/coreos/pkg`
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-06-16 11:14:16 -04:00
Giuseppe Scrivano
c98306a09e
test: adjust summary test for cgroup v2
...
on cgroup v2 the reported metric is recursive for the entire and it
includes all the sub cgroups.
Adjust the test accordingly.
Closes: https://github.com/kubernetes/kubernetes/issues/99230
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-06-09 14:04:06 +02:00
Jordan Liggitt
4b45d0d921
Revert "Merge pull request 101888 from kolyshkin/update-runc-rc94"
...
This reverts commit b1b06fe0a4
, reversing
changes made to 382a33986b
.
2021-05-18 09:13:47 -04:00
Giuseppe Scrivano
a460aaf41d
test: adjust number of expected page faults
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-05-10 17:34:49 -07:00
wojtekt
a74737eb03
Mark remaining e2e_node tests with [sig-*] label
2021-02-23 20:11:09 +01:00
Kubernetes Prow Robot
5cdc3e6e20
Merge pull request #95613 from MHBauer/CAP_NET_RAW
...
CAP_NET_RAW should be NET_RAW
2020-12-08 16:29:28 -08:00
Harshal Patil
199b49941f
Increase the timeout to allow summary test pod to start
...
Signed-off-by: Harshal Patil <harpatil@redhat.com>
2020-11-06 15:54:13 +05:30
Kubernetes Prow Robot
df3d0eb8d4
Merge pull request #95345 from harche/summary_test
...
Make stats summary tests more flexible
2020-11-02 13:41:11 -08:00
Harshal Patil
bff8109eb7
Adjust the acceptable value of UsageNanoCores
...
Signed-off-by: Harshal Patil <harpatil@redhat.com>
2020-10-21 22:00:44 +05:30
Morgan Bauer
1ac20e931e
CAP_NET_RAW should be NET_RAW
...
Format of Capability adds CAP_ prefix automatically.
Add commentary as test progress output.
Clear up some existing comments.
2020-10-15 10:14:22 -07:00
Harshal Patil
17e5f4e836
add CAP_NET_RAW capability to CRI stats summery test
...
Signed-off-by: Harshal Patil <harpatil@redhat.com>
2020-10-06 13:37:08 +05:30
Marek Siarkowicz
7d309e0104
Move Kubelet Summary API to staging repo
2020-09-22 18:23:28 +02:00
Giuseppe Scrivano
43c56eb403
e2e_node: adapt tests to cgroup v2
...
and fix node_container_manager_test to run with the systemd cgroup
manager.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-04-09 16:18:05 +02:00
drfish
dfab6b637f
Update .import-aliases for e2e test framework
2020-03-25 11:40:02 +08:00
louisgong
0efb70c0a2
eviction by process number
2020-03-24 09:25:04 +08:00
SataQiu
d2bdf89a8b
fix golint issues in test/e2e_node
2019-11-26 16:26:55 +08:00
SataQiu
50bc528a7e
e2e: move LogFailedContainers out of e2e test framework util.go
2019-11-15 10:21:26 +08:00
David Zhu
f15cc60957
Update golang scientific notation using hack/update-gofmt.sh
2019-09-12 18:05:49 -07:00
carlory
d1290ffdef
clean up test code
2019-09-05 23:44:19 +08:00
SataQiu
641d330f89
e2e_node: clean up non-recommended import
2019-07-28 12:49:36 +08:00
Kubernetes Prow Robot
dc8b928136
Merge pull request #79162 from SataQiu/fix-test-20190619
...
Refactor: replace framework.Failf with e2elog.Failf
2019-06-21 12:17:04 -07:00
SataQiu
332be4b1e3
refactor: replace framework.Failf with e2elog.Failf
2019-06-19 17:52:35 +08:00
Davanum Srinivas
a6f8d575ba
Add kubeletstatsv1alpha1 as the preferred alias for k8s.io/kubernetes/pkg/kubelet/apis/stats/v1alpha1
...
Change-Id: I05a8390a667dba307c09d95f836e08e0759c12ee
2019-06-15 22:31:51 -04:00
SataQiu
d3a902ff5b
e2e refactor: cleanup Logf form framework/util
2019-05-24 16:39:46 +08:00
SataQiu
252cabf155
[e2e] test/e2e/framework/volume_util.go -> test/e2e/framework/volume/fixtures.go
2019-04-13 16:58:37 +08:00
Manjunath A Kumatagi
833a28b640
increase the memory limits to max
2019-01-22 23:23:50 -06:00
Manjunath A Kumatagi
f14138c9f0
Bump the pod memory to higher levels to work on power
2019-01-17 02:37:51 -06:00
Yu-Ju Hong
5802f18283
test/e2e_node: mark more tests with [NodeConformance]
2018-05-21 17:52:36 -07:00
Lantao Liu
002483fe72
Lower UsageNanoCores boundary in summary api test.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-04-17 18:37:51 -07:00