Commit Graph

38 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
d863d04adc
Merge pull request #114580 from pohly/e2e-ginkgo-timeout-fixes
e2e ginkgo timeout fixes, III
2023-01-30 13:48:48 -08:00
Paulo Gonçalves Lima
d1278a0830 Fix: Improves the log for failing tests in e2e/apps.
Issue #105678
2023-01-28 02:50:32 -03:00
Patrick Ohly
a2722ffa4a e2e: replace WithTimeout with NodeTimeout
The intend of timeout handling (for the entire "It" and not just a few calls)
becomes more obvious and simpler when using ginkgo.NodeTimeout as decorator.
2023-01-02 10:47:00 +01:00
Patrick Ohly
29d6d03a3c e2e scheduling: fix scope of context.WithTimeout
The original intend from v1.26.0 was to only apply the timeout to the following
cache.WaitForCacheSync.
2022-12-19 10:00:00 +01:00
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
0d73c0d0e5 e2e: fix linter errors
Adding "ctx" as parameter in the previous commit led to some linter errors
about code that overwrites "ctx" without using it.

This gets fixed by replacing context.Background or context.TODO in those code
lines with the new ctx parameter.

Two context.WithCancel calls can get removed completely because the context
automatically gets cancelled by Ginkgo when the test returns.
2022-12-10 20:35:46 +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
Stephen Heywood
bf22ad1a15 Promote limitRange e2e test to Conformance 2022-10-10 11:37:57 +13:00
Stephen Heywood
12fe011f73 Create e2e test for LimitRange endpoints
e2e test validates the following 3 endpoints
- listCoreV1LimitRangeForAllNamespaces
- patchCoreV1NamespacedLimitRange
- deleteCoreV1CollectionNamespacedLimitRange
2022-09-30 07:51:05 +13: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
Lukasz Szaszkiewicz
4a7845b485 users of watchtools.NewIndexerInformerWatcher should wait for the informer to sync
previously users of this method were relying on the fact that a call to LIST was made.
Instead, users should use the dedicated `HasSynced` method.
2022-05-24 13:05:40 +02:00
Sergiusz Urbaniak
373c08e0c7
test/e2e/framework: configure pod security admission level for e2e tests 2022-03-28 15:42:10 +02:00
Davanum Srinivas
75748c185e
enable verify-golangci-lint.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-07-14 08:53:33 -04:00
Davanum Srinivas
07332ad398
fix ineffassign and varcheck
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-07-14 08:41:22 -04:00
Wei Huang
24bbedb27d
Deflake LimitRange e2e test 2020-08-07 17:22:35 -07:00
Jefftree
ace97738e2 Update formatting of conformance comment 2020-07-29 20:50:44 -07:00
Kenichi Omichi
d1361d10fe Move NewTestPod() to e2e/scheduling
because the function is called in e2e/scheduling tests.
2020-03-23 23:56:09 +00:00
Mike Danese
aaf855c1e6 deref all calls to metav1.NewDeleteOptions that are passed to clients.
This is gross but because NewDeleteOptions is used by various parts of
storage that still pass around pointers, the return type can't be
changed without significant refactoring within the apiserver. I think
this would be good to cleanup, but I want to minimize apiserver side
changes as much as possible in the client signature refactor.
2020-03-05 14:59:46 -08:00
Mike Danese
25651408ae generated: run refactor 2020-02-08 12:30:21 -05:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
Caleb Woodbine
bc2aabaaeb Add: promotion for LimitRange defaults test to Conformance 2020-01-19 20:44:42 +00:00
Mark Janssen
1a1b7001d6 Fix staticcheck failures for scheduler packages
Errors from staticcheck:
cmd/kube-scheduler/app/server.go:297:27: prometheus.Handler is deprecated: Please note the issues described in the doc comment of InstrumentHandler. You might want to consider using promhttp.Handler instead.  (SA1019)
pkg/apis/scheduling/v1alpha1/defaults.go:27:6: func addDefaultingFuncs is unused (U1000)
pkg/apis/scheduling/v1beta1/defaults.go:27:6: func addDefaultingFuncs is unused (U1000)
test/e2e/scheduling/predicates.go:757:6: func verifyReplicasResult is unused (U1000)
test/e2e/scheduling/predicates.go:765:6: func getPodsByLabels is unused (U1000)
test/e2e/scheduling/predicates.go:772:6: func runAndKeepPodWithLabelAndGetNodeName is unused (U1000)
test/e2e/scheduling/limit_range.go:172:3: this value of pod is never used (SA4006)
test/e2e/scheduling/limit_range.go:177:3: this value of pod is never used (SA4006)
test/e2e/scheduling/limit_range.go:196:3: this value of pod is never used (SA4006)
test/e2e/scheduling/limit_range.go:201:3: this value of pod is never used (SA4006)
test/e2e/scheduling/limit_range.go:240:3: this value of pod is never used (SA4006)
test/e2e/scheduling/taints.go:428:13: this value of err is never used (SA4006)
test/e2e/scheduling/ubernetes_lite.go:219:2: this value of pods is never used (SA4006)
test/integration/scheduler/extender_test.go:78:4: this value of resp is never used (SA4006)
test/integration/volumescheduling/volume_binding_test.go:529:15: this result of append is never used, except maybe in other appends (SA4010)
test/integration/volumescheduling/volume_binding_test.go:538:15: this result of append is never used, except maybe in other appends (SA4010)
2019-09-23 22:52:57 +02:00
s-ito-ts
8745f02015 Use log functions of core framework on test/e2e/scheduling 2019-08-30 06:27:42 +00:00
draveness
c38ae01f8e feat: move service_util to separated package 2019-07-19 08:32:39 +08:00
Pandiyaraja Ramamoorthy
ecf3bb0c03 removed flaky watch code and added NewIndexerInformerWatcher 2019-07-10 00:02:04 +05:30
s-ito-ts
e7752f72e4 Use framework.ExpectEqual() under e2e/scheduling 2019-07-04 08:51:24 +00:00
SataQiu
332be4b1e3 refactor: replace framework.Failf with e2elog.Failf 2019-06-19 17:52:35 +08:00
Kenichi Omichi
496a18febc Add hack/verify-test-code.sh
This script checks coding style for test code.
It is useful to enforce developers to use framework methods for
keeping readable test code for example.
2019-05-22 14:15:25 +00:00
Kenichi Omichi
48f1f74a51 Use ExpectNoError() for scalability and scheduling
The e2e test framework has ExpectNoError() for readable test code.
This replaces Expect(err).NotTo(HaveOccurred()) with it.
2019-05-15 20:19:25 +00:00
danielqsj
4cb4864487 replace test error checking with more readable way 2019-05-14 14:17:20 +08:00
danielqsj
15a4342fe8 remove dot imports in e2e/scheduling 2019-05-14 14:17:20 +08:00
draveness
da7507500f refactor: use e2elog.Logf instead of framework.Logf 2019-05-07 08:15:31 +08:00
Di Xu
e6f32eea74 verifying LimitRange update is effective before creating new pod 2018-09-01 17:40:29 +08:00
Jing Xu
b2e744c620 Promote LocalStorageCapacityIsolation feature to beta
The LocalStorageCapacityIsolation feature added a new resource type
ResourceEphemeralStorage "ephemeral-storage" so that this resource can
be allocated, limited, and consumed as the same way as CPU/memory. All
the features related to resource management (resource request/limit, quota, limitrange) are avaiable for local ephemeral storage.

This local ephemeral storage represents the storage for root file system, which will be consumed by containers' writtable layer and logs. Some volumes such as emptyDir might also consume this storage.
2018-03-02 15:10:08 -08:00
Nikita Komarov
c77923d0fe LimitRange e2e test improved. 2017-11-16 16:46:41 +03:00
NickrenREN
1633cdde05 Add limitrange e2e test for LocalStorageCapacityIsolation feature 2017-11-04 12:47:34 +08:00
Kevin
4c8539cece use core client with explicit version globally 2017-10-27 15:48:32 +08:00
Gavin
441fed1a9f migrate resource related files to sig scheduling 2017-10-23 11:14:27 +08:00