Skip to content

Commit

Permalink
UPSTREAM: <carry>: Remove excessive e2e logging
Browse files Browse the repository at this point in the history
UPSTREAM: <carry>: Remove a redundant output in the tests

This line is not necessary for our test usage and should not be an
issue in OpenShift (openshift-tests already verifies this correctly).

UPSTREAM: <carry>: Remove excessive logging during e2e upgrade test

This line makes the upgrade log output unreadable and provides
no value during the set of tests it's used in:

```
Jan 12 20:49:25.628: INFO: cluster upgrade is Progressing: Working towards registry.svc.ci.openshift.org/ci-op-jbtg7jjb/release@sha256:144e73d125cce620bdf099be9a85225ade489a95622a70075d264ea3ff79219c: downloading update
Jan 12 20:49:26.692: INFO: Poke("http://a74e3476115ce4d2d817a1e5ea608dad-802917831.us-east-1.elb.amazonaws.com:80/echo?msg=hello"): success
Jan 12 20:49:28.727: INFO: Poke("http://a74e3476115ce4d2d817a1e5ea608dad-802917831.us-east-1.elb.amazonaws.com:80/echo?msg=hello"): success
```

OpenShift-Rebase-Source: 8e73298
  • Loading branch information
p0lyn0mial authored and bertinatto committed Mar 6, 2024
1 parent 3898ab4 commit a22a5d6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 0 additions & 2 deletions test/e2e/framework/internal/unittests/cleanup/cleanup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,7 @@ const (
< Exit [BeforeEach] e2e - cleanup_test.go:63 <time>
> Enter [BeforeEach] e2e - set up framework | framework.go:xxx <time>
STEP: Creating a kubernetes client - framework.go:xxx <time>
<klog> util.go:xxx] >>> kubeConfig: yyy/kube.config
STEP: Building a namespace api object, basename test-namespace - framework.go:xxx <time>
<klog> framework.go:xxx] Skipping waiting for service account
< Exit [BeforeEach] e2e - set up framework | framework.go:xxx <time>
> Enter [BeforeEach] e2e - cleanup_test.go:56 <time>
<klog> cleanup_test.go:56] extension before
Expand Down
5 changes: 2 additions & 3 deletions test/e2e/framework/network/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -1003,8 +1003,6 @@ func PokeHTTP(host string, port int, path string, params *HTTPPokeParams) HTTPPo
params.Timeout = 10 * time.Second
}

framework.Logf("Poking %q", url)

resp, err := httpGetNoConnectionPoolTimeout(url, params.Timeout)
if err != nil {
ret.Error = err
Expand Down Expand Up @@ -1056,7 +1054,8 @@ func PokeHTTP(host string, port int, path string, params *HTTPPokeParams) HTTPPo
}

ret.Status = HTTPSuccess
framework.Logf("Poke(%q): success", url)
// causes excessive logging that provides no value
// framework.Logf("Poke(%q): success", url)
return ret
}

Expand Down
4 changes: 2 additions & 2 deletions test/e2e/framework/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ func countEndpointsSlicesNum(epList *discoveryv1.EndpointSliceList, addressType

// restclientConfig returns a config holds the information needed to build connection to kubernetes clusters.
func restclientConfig(kubeContext string) (*clientcmdapi.Config, error) {
Logf(">>> kubeConfig: %s", TestContext.KubeConfig)
//Logf(">>> kubeConfig: %s", TestContext.KubeConfig)
if TestContext.KubeConfig == "" {
return nil, fmt.Errorf("KubeConfig must be specified to load client config")
}
Expand All @@ -512,7 +512,7 @@ func restclientConfig(kubeContext string) (*clientcmdapi.Config, error) {
return nil, fmt.Errorf("error loading KubeConfig: %v", err.Error())
}
if kubeContext != "" {
Logf(">>> kubeContext: %s", kubeContext)
//Logf(">>> kubeContext: %s", kubeContext)
c.CurrentContext = kubeContext
}
return c, nil
Expand Down

0 comments on commit a22a5d6

Please sign in to comment.