summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVenkata Harish Kajur <vk250x@att.com>2021-04-15 04:19:40 +0000
committerGerrit Code Review <gerrit@onap.org>2021-04-15 04:19:40 +0000
commit886c6d68c32b2bec82434938a008ae35c73bfd14 (patch)
treed2202744b499f089b22941dd79f99e5060e23c40
parentb6c8cab2f94bab951d73a2f223d8eedfb1271cfd (diff)
parent8e9bead2bb055b5f164eafed40d9f2dc6572c2f0 (diff)
Merge "Added proxy args in the haproxy Dockerfile Added DirtiesContext to URIToRelationshipObjectTest for successful test case execution."
-rw-r--r--aai-common-docker/aai-haproxy-image/src/main/docker/Dockerfile15
-rw-r--r--aai-core/src/test/java/org/onap/aai/parsers/uri/URIToRelationshipObjectTest.java2
2 files changed, 11 insertions, 6 deletions
diff --git a/aai-common-docker/aai-haproxy-image/src/main/docker/Dockerfile b/aai-common-docker/aai-haproxy-image/src/main/docker/Dockerfile
index e331e92e..3e04c92c 100644
--- a/aai-common-docker/aai-haproxy-image/src/main/docker/Dockerfile
+++ b/aai-common-docker/aai-haproxy-image/src/main/docker/Dockerfile
@@ -1,10 +1,13 @@
FROM haproxy:1.7.10-alpine
-# Set up your corporate proxy if there is
-ENV HTTP_PROXY ""
-ENV HTTPS_PROXY ""
-ENV http_proxy ""
-ENV https_proxy ""
+# For building the image in a proxy environment if necessary
+ARG HTTP_PROXY
+ARG HTTPS_PROXY
+
+ENV HTTP_PROXY ${HTTP_PROXY}
+ENV HTTPS_PROXY ${HTTPS_PROXY}
+ENV http_proxy ${HTTP_PROXY}
+ENV https_proxy ${HTTPS_PROXY}
RUN apk add --no-cache \
ca-certificates \
@@ -27,5 +30,5 @@ RUN chmod +x /docker-entrypoint.sh
USER haproxy
ENTRYPOINT [ "/docker-entrypoint.sh" ]
-CMD [ "haproxy", "-f", "/usr/local/etc/haproxy/haproxy.cfg", "-f", "/usr/local/etc/haproxy/resolvers.conf" ]
+CMD [ "haproxy", "-f", "/usr/local/etc/haproxy/haproxy.cfg", "-f", "/usr/local/etc/haproxy/resolvers.conf" ]
EXPOSE 8443
diff --git a/aai-core/src/test/java/org/onap/aai/parsers/uri/URIToRelationshipObjectTest.java b/aai-core/src/test/java/org/onap/aai/parsers/uri/URIToRelationshipObjectTest.java
index e983d007..ee8cce21 100644
--- a/aai-core/src/test/java/org/onap/aai/parsers/uri/URIToRelationshipObjectTest.java
+++ b/aai-core/src/test/java/org/onap/aai/parsers/uri/URIToRelationshipObjectTest.java
@@ -40,7 +40,9 @@ import org.onap.aai.AAISetup;
import org.onap.aai.exceptions.AAIException;
import org.onap.aai.introspection.*;
import org.onap.aai.setup.SchemaVersion;
+import org.springframework.test.annotation.DirtiesContext;
+@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
public class URIToRelationshipObjectTest extends AAISetup {
private SchemaVersion latest;