Commit Graph

128 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
806b215cce
Merge pull request #115987 from yuanchen8911/cleanup
Replace closures in test packages
2023-02-28 01:47:29 -08:00
Yuan Chen
a24aef6510 Replace a function closure
Replace more closures with pointer conversion

Replace deprecated Int32Ptr to Int32
2023-02-27 09:13:36 -08:00
Patrick Ohly
41f23f52d0 test: fix ginkgolinter issues
All of these issues were reported by https://github.com/nunnatsa/ginkgolinter.
Fixing these issues is useful (several expressions get simpler, using
framework.ExpectNoError is better because it has additional support for
failures) and a necessary step for enabling that linter in our golangci-lint
invocation.
2023-02-22 19:36:05 +01:00
Rafa de Castro
a887a3b4fd
Changed code to improve output messages on error for files under test/e2e/apps (#109944)
* Improving the output of tests in case of error

* Better error message

Also, the condition in the second case was reversed

* Fixing 2 tests whose condition was inverted

* Again I got the conditions wrong

* Sorry for the confusion

* Improved error messages on failures
2023-01-11 02:11:44 -08: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
Kubernetes Prow Robot
2df02b3ef5
Merge pull request #114425 from pohly/e2e-ginkgo-timeouts-defer-cleanup
e2e ginkgo timeouts: simplify code
2022-12-13 10:28:09 -08:00
Patrick Ohly
c466c49682 e2e apps: avoid assertions in wait.Until callback
wait.Until catches panics and logs them, which leads to confusing
output. Besides, the test is written so that failures must get reported to the
main goroutine.
2022-12-12 11:30:07 +01:00
Patrick Ohly
2168dd5334 e2e apps: capture expected state before making changes
Looking up the expected nodes in the goroutine raced with the test making
changes to the configuration. When doing (unrelated?) changes, the test started
to fail:

Oct 23 15:47:03.092: INFO: Unexpected error:
    <*errors.errorString | 0xc001154c70>: {
        s: "no subset of available IP address found for the endpoint test-rolling-update-with-lb within timeout 2m0s",
    }
Oct 23 15:47:03.092: FAIL: no subset of available IP address found for the endpoint test-rolling-update-with-lb within timeout 2m0s
2022-12-12 11:30:07 +01:00
Tim Hockin
d0e2b06850
ServiceExternalTrafficPolicyType: s/Type//
Rename ServiceExternalTrafficPolicyType => ServiceExternalTrafficPolicy
2022-12-11 13:48:27 -08: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
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
Sergiusz Urbaniak
373c08e0c7
test/e2e/framework: configure pod security admission level for e2e tests 2022-03-28 15:42:10 +02:00
Ciprian Hacman
574f788711 Skip LB test for IPv6 clusters 2021-12-13 11:43:06 +02:00
Claudiu Belu
76d20c5bce tests: Use E2E framework deployments
Deployments can be created easier with the NewDeployment
found in test/e2e/framework/deployment.
2021-10-09 06:11:07 -07:00
Maciej Szulik
8322121434
Move test-related utils to test/utils 2021-10-12 14:52:19 +02:00
Kubernetes Prow Robot
a535acdc91
Merge pull request #102736 from atiratree/e2e-bump-ProgressDeadlineSeconds
e2e test: bump ProgressDeadlineSeconds in Deployment iterative rollouts
2021-08-11 09:16:46 -07:00
Kubernetes Prow Robot
22d1eff331
Merge pull request #102730 from atiratree/deployment-e2e-pause-fix
e2e test: fix Pause in Deployment iterative rollouts
2021-08-11 06:18:46 -07:00
Stephen Heywood
405e9a5172 Promote Deployment Status e2e test to Conformance 2021-06-28 11:04:30 +12:00
atiratree
c882437f22 e2e test: bump ProgressDeadlineSeconds in Deployment iterative rollouts
align it with WaitForDeploymentComplete timeout to give the Deployment a chance to complete on contended environments
2021-06-09 15:24:30 +02:00
atiratree
9d636fea04 e2e test: fix Pause in Deployment iterative rollouts 2021-06-09 10:28:35 +02:00
Stephen Heywood
3c1576ae57 Create e2e Deployment status lifecycle test
e2e test validates the following 3 endpoints
- readAppsV1NamespacedDeploymentStatus
- replaceAppsV1NamespacedDeploymentStatus
- patchAppsV1NamespacedDeploymentStatus
2021-05-19 16:34:10 +12:00
Stephen Heywood
4e3d006001 Increase TerminationGracePeriodSeconds to 1 2021-05-12 11:09:34 +12:00
James Sturtevant
d0683b8ce2 align some of the pod start up times 2021-04-02 11:29:38 -07:00
Jing Xu
787559581f Fix deployment lifecycle and ReplicaSet test issue
The pause image should not run sleep commands. This will cause pod fail
to start correctly.

See details in issue #100047. We discovered some behavior about
development in certain cases like new pod fail to start correctly, but will be further investigated.

Change-Id: I9761bbefa694f6fe51a6f1e7561fa7e566ce4d8f
2021-03-24 18:22:13 -07:00
Riaan Kleinhans
303fd4aca2 Promote DeploymentScale e2e test to Conformance 2021-02-19 13:13:29 +13:00
Riaan Kleinhans
7cea43a4b4 Create DeploymentScale test 2021-02-12 11:53:08 +13:00
Kubernetes Prow Robot
1ea29cec9c
Merge pull request #96487 from ii/promote-lifecycle-test-deployment
Promote AppsV1Deployment resource lifecycle test - +6 endpoint coverage
2020-11-19 13:02:51 -08:00
Hippie Hacker
6c74641615 Increase watch timeout when scaling Deployment Replicas 2020-11-13 07:50:19 +13:00
Stephen Heywood
e6f7fed324 Promote Deployment lifecycle e2e test to Conformance 2020-11-12 13:19:05 +13:00
Kubernetes Prow Robot
739768d086
Merge pull request #93458 from ii/create-deployment-resource-lifecycle-test
Updated Create AppsV1Deployment resource lifecycle test - +6 endpoint coverage
2020-11-04 01:08:04 -08:00
Stephen Heywood
2c4117dc73 Adjusted e2e test watch timeouts, logging and pod management 2020-11-03 11:20:27 +13:00
Kubernetes Prow Robot
1a66eb7b8a
Merge pull request #89482 from renatoviana12/master
fixed percentage behaviour in instr
2020-10-05 20:00:19 -07:00
Renato Viana
316eff8dee Fixed percentage behavior in instr
fixed syntax, wrote a test

fixed a test

.

1

Update staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr_test.go

Co-Authored-By: Joel Speed <Joel.speed@hotmail.co.uk>

added test

.

fix

fix test

fixed a test

gofmt

lint

fix

function name

validation fix

.

godocs added

.
2020-09-30 21:23:05 +01:00
Dr. Stefan Schimanski
aa04982471 e2e: fix deployment non-unique env vars to avoid SSA error 2020-09-08 13:45:32 +02:00
Maciej Szulik
5765bf74ce
Skip LB test per schedulable node count 2020-08-10 16:13:29 +02:00
Caleb Woodbine
8411ada27a Adjust default replica count to 2 replicas 2020-08-03 09:03:10 +12:00
Jefftree
ace97738e2 Update formatting of conformance comment 2020-07-29 20:50:44 -07:00
Caleb Woodbine
0a6dc830da Fix label reference in deployment checks 2020-07-29 10:33:21 +12:00
Caleb Woodbine
d4540f2b40 Update readiness checks 2020-07-29 08:54:55 +12:00
Caleb Woodbine
29664dd77e Update ready condition 2020-07-29 08:46:00 +12:00
Stephen Heywood
1077a9e862 Add missing release metadata for e2e tests 2020-07-27 21:56:49 +00:00
Caleb Woodbine
875dddf2ba Create Deployment resource lifecycle test 2020-07-27 16:26:39 +12:00
Jordan Liggitt
3fa8b15636 Revert "Merge pull request 92589 from ii/create-deployment-resource-lifecycle-test" 2020-07-24 00:30:13 -04:00
Kubernetes Prow Robot
8a3fc2d7e2
Merge pull request #92589 from ii/create-deployment-resource-lifecycle-test
Create AppsV1Deployment resource lifecycle test - +6 endpoint coverage
2020-07-23 19:30:23 -07:00
Caleb Woodbine
ee29022ac8 Update test images to use conformance images 2020-07-23 14:07:01 +12:00
Caleb Woodbine
84de375921 Fix error message 2020-07-22 11:17:37 +12:00
Caleb Woodbine
11492f7b91 Add check for Modified after patch; Update checks for scale 2020-07-22 09:57:11 +12:00
Caleb Woodbine
fc8e24c686 Add watchtools.Until for fetching watch events; Remove plain watch 2020-07-22 09:29:09 +12:00
Caleb Woodbine
9c2330db4c Revert ginkgoRecover 2020-07-22 08:48:28 +12:00