|
1 |
| -//go:build !fluentd |
2 |
| - |
3 | 1 | package misc
|
4 | 2 |
|
5 | 3 | import (
|
6 | 4 | . "github.com/onsi/ginkgo"
|
7 | 5 | . "github.com/onsi/gomega"
|
8 | 6 | logging "github.com/openshift/cluster-logging-operator/api/logging/v1"
|
9 | 7 | "github.com/openshift/cluster-logging-operator/internal/constants"
|
| 8 | + "github.com/openshift/cluster-logging-operator/internal/runtime" |
10 | 9 | "github.com/openshift/cluster-logging-operator/test/framework/functional"
|
11 | 10 | testfw "github.com/openshift/cluster-logging-operator/test/functional"
|
12 | 11 | )
|
@@ -36,5 +35,19 @@ var _ = Describe("[Functional][Misc][API_CLI] Functional test", func() {
|
36 | 35 | out, _ := framework.RunCommand(constants.CollectorName, `curl`, `-sv`, `-m`, `5`, `--connect-timeout`, `3`, `http://127.0.0.1:8686/health`)
|
37 | 36 | Expect(out).To(ContainSubstring(`{"ok":true}`))
|
38 | 37 | })
|
| 38 | + It("should remap Proxy env variable from lowercase to uppercase if it's set", func() { |
| 39 | + envVisitor := func(b *runtime.PodBuilder) error { |
| 40 | + b.GetContainer(constants.CollectorName).AddEnvVar("http_proxy", "http://my_proxy:8080") |
| 41 | + b.GetContainer(constants.CollectorName).AddEnvVar("https_proxy", "https://my_proxy:9090") |
| 42 | + b.GetContainer(constants.CollectorName).AddEnvVar("no_proxy", "my-host,your-host") |
| 43 | + return nil |
| 44 | + } |
| 45 | + Expect(framework.DeployWithVisitor(envVisitor)).To(BeNil()) |
| 46 | + out, err := framework.ReadCollectorLogs() |
| 47 | + Expect(err).To(BeNil()) |
| 48 | + Expect(out).To(ContainSubstring(`HTTP_PROXY=http://my_proxy:8080`)) |
| 49 | + Expect(out).To(ContainSubstring(`HTTPS_PROXY=https://my_proxy:9090`)) |
| 50 | + Expect(out).To(ContainSubstring(`NO_PROXY=my-host,your-host`)) |
| 51 | + }) |
39 | 52 | })
|
40 | 53 | })
|
0 commit comments