squakez commented on code in PR #5581:
URL: https://github.com/apache/camel-k/pull/5581#discussion_r1627207818
##########
e2e/advanced/maven_http_proxy_test.go:
##########
@@ -210,10 +210,15 @@ func TestMavenProxy(t *testing.T) {
g.Expect(err).To(Succeed())
g.Expect(proxies.Items).To(HaveLen(1))
+ ocp, err := openshift.IsOpenShift(TestClient(t))
+ require.NoError(t, err)
+
logs := Logs(t, ctx, ns, proxies.Items[0].Name,
corev1.PodLogOptions{})()
g.Expect(logs).NotTo(BeEmpty())
- g.Expect(logs).To(ContainSubstring("\"CONNECT
repo.maven.apache.org:443 HTTP/1.1\" 200"))
-
+ if !ocp {
+ // OpenShift has internal configuration (like oauth)
that overriddes the default repo connect URL
+ g.Expect(logs).To(ContainSubstring("\"CONNECT
repo.maven.apache.org:443 HTTP/1.1\" 200"))
Review Comment:
I think that's fine. What we should understand is if there is anything
specific in the operator log that can make us check that we're connecting to a
proxy. However, this could be something done at OS level, so, I think the
reasoning on removing the check is fine by assuming that any third party will
do its work. In theory, we should be fine by setting the env var and any
tooling should be honoring such a configuration. However, Maven is a bit
particular, and it requires an additional setting [1]. This is in fact
something we are already doing, see:
https://github.com/apache/camel-k/blob/cb74737f23c8622a100eaa67a03afc6ca6f1ac35/pkg/util/maven/maven_proxies.go#L30
A follow up work we can do (into this or after this PR) is to add some unit
test to validate that, in presence of the HTTP_PROXY vars, the settings are
created as expected. And the E2E can validate the presence of such
configuration in the maven settings created next to the IntegrationPlatform.
[1] https://maven.apache.org/guides/mini/guide-proxies.html
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]