diff options
Diffstat (limited to 'test')
4 files changed, 5 insertions, 2 deletions
diff --git a/test/mocks/mass-pnf-sim/pnf-sim-lightweight/config/netconf.env b/test/mocks/mass-pnf-sim/pnf-sim-lightweight/config/netconf.env index c4f7b4a80..ef79365ec 100644 --- a/test/mocks/mass-pnf-sim/pnf-sim-lightweight/config/netconf.env +++ b/test/mocks/mass-pnf-sim/pnf-sim-lightweight/config/netconf.env @@ -8,4 +8,3 @@ NETCONF_ADDRESS=localhost NETCONF_PORT=830 NETCONF_MODEL=pnf-simulator NETCONF_MAIN_CONTAINER=config -TZ=Europe/Warsaw diff --git a/test/mocks/mass-pnf-sim/pnf-sim-lightweight/docker-compose-template.yml b/test/mocks/mass-pnf-sim/pnf-sim-lightweight/docker-compose-template.yml index aa0261c0a..2c9226a87 100644 --- a/test/mocks/mass-pnf-sim/pnf-sim-lightweight/docker-compose-template.yml +++ b/test/mocks/mass-pnf-sim/pnf-sim-lightweight/docker-compose-template.yml @@ -19,6 +19,8 @@ services: - ./json_schema:/json_schema - ./config/config.yml:/config/config.yml:rw - ./files/:/files/:rw + environment: + TZ: "${TIMEZONE}" env_file: - ./config/netconf.env restart: on-failure diff --git a/test/mocks/mass-pnf-sim/pnf-sim-lightweight/simulator.sh b/test/mocks/mass-pnf-sim/pnf-sim-lightweight/simulator.sh index 4c5d9f062..6ba707973 100755 --- a/test/mocks/mass-pnf-sim/pnf-sim-lightweight/simulator.sh +++ b/test/mocks/mass-pnf-sim/pnf-sim-lightweight/simulator.sh @@ -74,6 +74,8 @@ function compose(){ export PORTFTPS=$8 export IPFTPS=$9 export IPSFTP=${10} + LOCALTIME=$(ls -l /etc/localtime) + export TIMEZONE=${LOCALTIME//*zoneinfo\/} #will insert $I to distinguish containers, networks properly #docker compose cannot substitute these, as they are keys, not values. diff --git a/test/mocks/mass-pnf-sim/pnf-sim-lightweight/src/main/java/org/onap/pnfsimulator/message/JSONObjectFactory.java b/test/mocks/mass-pnf-sim/pnf-sim-lightweight/src/main/java/org/onap/pnfsimulator/message/JSONObjectFactory.java index 545a56882..ded991044 100644 --- a/test/mocks/mass-pnf-sim/pnf-sim-lightweight/src/main/java/org/onap/pnfsimulator/message/JSONObjectFactory.java +++ b/test/mocks/mass-pnf-sim/pnf-sim-lightweight/src/main/java/org/onap/pnfsimulator/message/JSONObjectFactory.java @@ -70,7 +70,7 @@ final class JSONObjectFactory { commonEventHeader.put(INTERNAL_HEADER_FIELDS, new JSONObject()); commonEventHeader.put(VERSION, VERSION_NUMBER); commonEventHeader.put(VES_EVENT_LISTENER_VERSION, VES_EVENT_LISTENER_VERSION_NUMBER); - String absPath = System.getProperty("user.dir"); + String absPath = new File("").getAbsolutePath(); String nodeName = absPath.substring(absPath.lastIndexOf(File.separator)+1); commonEventHeader.put(SOURCE_NAME, nodeName); commonEventHeader.put(REPORTING_ENTITY_NAME, nodeName); |