Migrate to structured logging (klog)

This commit is contained in:
Manuel Alejandro de Brito Fontes 2020-09-27 17:32:40 -03:00
parent 93ac8d5a21
commit 108637bb1c
31 changed files with 161 additions and 171 deletions

View file

@ -135,7 +135,7 @@ var _ = framework.DescribeAnnotation("affinitymode", func() {
response = request.WithCookies(cookies).Expect()
try++
}
assert.LessOrEqual(ginkgo.GinkgoT(), try, 29, "Tries reached it's maximum, backends did not deployed in time.")
assert.LessOrEqual(ginkgo.GinkgoT(), try, 29, "Tries reached it's maximum, backends did not deployed in time")
// brand new backends equals new hostname
newHostName := getHostnameFromResponseBody(response.Body().Raw())

View file

@ -259,7 +259,7 @@ func (f *Framework) matchNginxConditions(name string, matcher func(cfg string) b
}
if klog.V(10).Enabled() && len(o) > 0 {
klog.Infof("nginx.conf:\n%v", o)
klog.InfoS("NGINX", "configuration", o)
}
// passes the nginx config to the passed function
@ -281,7 +281,7 @@ func (f *Framework) matchNginxCustomConditions(from string, to string, matcher f
}
if klog.V(10).Enabled() && len(o) > 0 {
klog.Infof("nginx.conf:\n%v", o)
klog.InfoS("NGINX", "configuration", o)
}
// passes the nginx config to the passed function

View file

@ -163,9 +163,9 @@ var _ = framework.IngressNginxDescribe("[Lua] dynamic configuration", func() {
expectedFailureResponseCode := resp.StatusCode
assert.Equal(ginkgo.GinkgoT(), originalResponseCode, 503, "Expected empty service to return 503 response.")
assert.Equal(ginkgo.GinkgoT(), expectedFailureResponseCode, 503, "Expected downscaled replicaset to return 503 response.")
assert.Equal(ginkgo.GinkgoT(), expectedSuccessResponseCode, 200, "Expected intermediate scaled replicaset to return a 200 response.")
assert.Equal(ginkgo.GinkgoT(), originalResponseCode, 503, "Expected empty service to return 503 response")
assert.Equal(ginkgo.GinkgoT(), expectedFailureResponseCode, 503, "Expected downscaled replicaset to return 503 response")
assert.Equal(ginkgo.GinkgoT(), expectedSuccessResponseCode, 200, "Expected intermediate scaled replicaset to return a 200 response")
})
ginkgo.It("handles an annotation change", func() {