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 Aug 24, 2023
1 parent 522d08b commit 0a450f4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ INFO: before
< 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>
INFO: >>> kubeConfig: yyy/kube.config
STEP: Building a namespace api object, basename test-namespace - framework.go:xxx <time>
INFO: Skipping waiting for service account
< Exit [BeforeEach] e2e - set up framework | framework.go:xxx <time>
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 @@ -478,7 +478,7 @@ func countEndpointsSlicesNum(epList *discoveryv1.EndpointSliceList) int {

// 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 @@ -487,7 +487,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 0a450f4

Please sign in to comment.