diff options
-rwxr-xr-x | portal-BE/build.sh | 5 | ||||
-rw-r--r-- | portal-BE/docker-compose.yml | 7 | ||||
-rw-r--r-- | portal-BE/src/main/resources/application.properties | 4 | ||||
-rw-r--r-- | portal-BE/src/test/java/org/onap/portal/framework/MockitoTestSuite.java | 6 |
4 files changed, 11 insertions, 11 deletions
diff --git a/portal-BE/build.sh b/portal-BE/build.sh index 68953384..2d1a4426 100755 --- a/portal-BE/build.sh +++ b/portal-BE/build.sh @@ -1,5 +1,8 @@ #!/bin/bash +export spring_datasource_username=portal +export spring_datasource_password=Test123456 + mvn clean install docker build -t portal_app . -docker-compose up +docker-compose up
\ No newline at end of file diff --git a/portal-BE/docker-compose.yml b/portal-BE/docker-compose.yml index 2293afb6..33ae6b0f 100644 --- a/portal-BE/docker-compose.yml +++ b/portal-BE/docker-compose.yml @@ -18,8 +18,8 @@ services: restart: always environment: - MYSQL_DATABASE=testdb - - MYSQL_USER=portal - - MYSQL_PASSWORD=Test123456 + - MYSQL_USER=${spring_datasource_username} + - MYSQL_PASSWORD=${spring_datasource_password} - MYSQL_RANDOM_ROOT_PASSWORD=yes healthcheck: test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"] @@ -32,6 +32,9 @@ services: restart: always ports: - 8080:8080 + environment: + - spring.datasource.username=${spring_datasource_username} + - spring.datasource.password=${spring_datasource_password} depends_on: - portal-db networks: diff --git a/portal-BE/src/main/resources/application.properties b/portal-BE/src/main/resources/application.properties index 6debc9ab..56e0f04d 100644 --- a/portal-BE/src/main/resources/application.properties +++ b/portal-BE/src/main/resources/application.properties @@ -5,8 +5,8 @@ spring.datasource.url=jdbc:mysql://portal-db:3306/testdb?createDatabaseIfNotExis spring.datasource.initialization-mode=always spring.session.jdbc.initialize-schema=always spring.datasource.continueOnError=true -spring.datasource.username=portal -spring.datasource.password=Test123456 +spring.datasource.username=${spring_datasource_username} +spring.datasource.password=${spring_datasource_password} #H2 config spring.h2.console.settings.web-allow-others=true spring.h2.console.enabled=true diff --git a/portal-BE/src/test/java/org/onap/portal/framework/MockitoTestSuite.java b/portal-BE/src/test/java/org/onap/portal/framework/MockitoTestSuite.java index e2da10ce..492c1795 100644 --- a/portal-BE/src/test/java/org/onap/portal/framework/MockitoTestSuite.java +++ b/portal-BE/src/test/java/org/onap/portal/framework/MockitoTestSuite.java @@ -37,12 +37,6 @@ */ package org.onap.portal.framework; -import static org.mockito.Mockito.when; - -import java.util.Enumeration; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequestWrapper; import javax.servlet.http.HttpServletResponse; |