Merge pull request #66891 from caesarxuchao/webhook-e2e-error-msg

Automatic merge from submit-queue (batch tested with PRs 66190, 66871, 66617, 66293, 66891). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Change the expected error message in webhook e2e test

Fix #66776.

The timeout error message sent by the apiserver was changed by #66616, which affects 1.12+ apiservers.

The expected error message in e2e test in 1.11 and 1.12 should only contain the common part of the pre-1.12 error message and post-1.12 message, because the upgrade&downgrade tests will run the 1.11 e2e test against 1.12 apiserver, and vice versa.

/sig api-machinery
/release-note-none
pull/8/head
Kubernetes Submit Queue 2018-08-02 15:42:23 -07:00 committed by GitHub
commit b00b504f57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -576,7 +576,7 @@ func testWebhook(f *framework.Framework) {
pod = hangingPod(f)
_, err = client.CoreV1().Pods(f.Namespace.Name).Create(pod)
Expect(err).NotTo(BeNil())
expectedTimeoutErr := "Timeout: request did not complete within requested timeout 30s"
expectedTimeoutErr := "request did not complete within"
if !strings.Contains(err.Error(), expectedTimeoutErr) {
framework.Failf("expect timeout error %q, got %q", expectedTimeoutErr, err.Error())
}