Added proxy args in the haproxy Dockerfile 47/120547/1
authorRenu Kumari <renu.kumari@bell.ca>
Tue, 13 Apr 2021 18:18:51 +0000 (14:18 -0400)
committerRenu Kumari <renu.kumari@bell.ca>
Wed, 14 Apr 2021 04:44:21 +0000 (00:44 -0400)
Added DirtiesContext to URIToRelationshipObjectTest for successful test case execution.

Issue-ID: AAI-3318
Signed-off-by: Renu Kumari <renu.kumari@bell.ca>
Change-Id: I53d9b031f93515fdec16fe3f7b0a580c8439b5b3

aai-common-docker/aai-haproxy-image/src/main/docker/Dockerfile
aai-core/src/test/java/org/onap/aai/parsers/uri/URIToRelationshipObjectTest.java

index e331e92..3e04c92 100644 (file)
@@ -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
index e983d00..ee8cce2 100644 (file)
@@ -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;