Remove unused variables and verbose e2e logs
This commit is contained in:
parent
47b5e20a88
commit
10dcf0db15
35 changed files with 331 additions and 427 deletions
|
|
@ -86,7 +86,7 @@ var _ = framework.DescribeAnnotation("affinity session-cookie-name", func() {
|
|||
|
||||
_, err := f.KubeClientSet.NetworkingV1beta1().Ingresses(f.Namespace).Update(context.TODO(), ing, metav1.UpdateOptions{})
|
||||
assert.Nil(ginkgo.GinkgoT(), err, "updating ingress")
|
||||
time.Sleep(5 * time.Second)
|
||||
framework.Sleep()
|
||||
|
||||
f.HTTPTestClient().
|
||||
GET("/").
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ import (
|
|||
"net/http"
|
||||
"reflect"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/onsi/ginkgo"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
|
@ -104,7 +103,7 @@ var _ = framework.DescribeAnnotation("affinitymode", func() {
|
|||
replicas = replicas + 1
|
||||
err := framework.UpdateDeployment(f.KubeClientSet, f.Namespace, deploymentName, replicas, nil)
|
||||
assert.Nil(ginkgo.GinkgoT(), err)
|
||||
time.Sleep(3 * time.Second)
|
||||
framework.Sleep()
|
||||
response = request.WithCookies(cookies).Expect()
|
||||
newHostName := getHostnameFromResponseBody(response.Body().Raw())
|
||||
assert.Equal(ginkgo.GinkgoT(), originalHostName, newHostName,
|
||||
|
|
@ -116,7 +115,7 @@ var _ = framework.DescribeAnnotation("affinitymode", func() {
|
|||
replicas = 0
|
||||
err := framework.UpdateDeployment(f.KubeClientSet, f.Namespace, deploymentName, replicas, nil)
|
||||
assert.Nil(ginkgo.GinkgoT(), err)
|
||||
time.Sleep(5 * time.Second)
|
||||
framework.Sleep()
|
||||
|
||||
// validate, there is no backend to serve the request
|
||||
response = request.WithCookies(cookies).Expect().Status(http.StatusServiceUnavailable)
|
||||
|
|
@ -125,13 +124,13 @@ var _ = framework.DescribeAnnotation("affinitymode", func() {
|
|||
replicas = 2
|
||||
err = framework.UpdateDeployment(f.KubeClientSet, f.Namespace, deploymentName, replicas, nil)
|
||||
assert.Nil(ginkgo.GinkgoT(), err)
|
||||
time.Sleep(5 * time.Second)
|
||||
framework.Sleep()
|
||||
|
||||
// wait brand new backends to spawn
|
||||
response = request.WithCookies(cookies).Expect()
|
||||
try := 0
|
||||
for (response.Raw().StatusCode == http.StatusServiceUnavailable) && (try < 30) {
|
||||
time.Sleep(5 * time.Second)
|
||||
framework.Sleep()
|
||||
response = request.WithCookies(cookies).Expect()
|
||||
try++
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ import (
|
|||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/onsi/ginkgo"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
|
@ -81,7 +80,7 @@ var _ = framework.DescribeAnnotation("from-to-www-redirect", func() {
|
|||
ing.Spec.TLS[0].SecretName,
|
||||
ing.Namespace)
|
||||
assert.Nil(ginkgo.GinkgoT(), err)
|
||||
time.Sleep(5 * time.Second)
|
||||
framework.Sleep()
|
||||
|
||||
f.WaitForNginxServer(toHost,
|
||||
func(server string) bool {
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ var _ = framework.DescribeAnnotation("influxdb-*", func() {
|
|||
var measurements string
|
||||
var err error
|
||||
|
||||
err = wait.PollImmediate(time.Second, time.Minute, func() (bool, error) {
|
||||
err = wait.Poll(time.Second, time.Minute, func() (bool, error) {
|
||||
measurements, err = extractInfluxDBMeasurements(f)
|
||||
if err != nil {
|
||||
return false, nil
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ func startIngress(f *framework.Framework, annotations map[string]string) map[str
|
|||
return strings.Contains(server, fmt.Sprintf("server_name %s ;", host))
|
||||
})
|
||||
|
||||
err := wait.PollImmediate(framework.Poll, framework.DefaultTimeout, func() (bool, error) {
|
||||
err := wait.Poll(framework.Poll, framework.DefaultTimeout, func() (bool, error) {
|
||||
|
||||
resp := f.HTTPTestClient().
|
||||
GET("/").
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue