summaryrefslogtreecommitdiffstats
path: root/test/functest
diff options
context:
space:
mode:
authorkrishna moorthy <krishna.moorthy6@wipro.com>2020-09-19 10:18:58 +0000
committerGerrit Code Review <gerrit@onap.org>2020-09-19 10:18:58 +0000
commit3014d7da4872982ea666a7bb11d8dc882bfa048c (patch)
tree9c879fe51390f92267416e9731791eec2db99409 /test/functest
parentedf98746a52408386efab26143778198b0efd3c5 (diff)
parentcc7372eefd2cc1ec0737f765a2600396f13e13ab (diff)
Merge "Fix osdf csit failure by fixing logging"
Diffstat (limited to 'test/functest')
-rw-r--r--test/functest/simulators/Dockerfile23
-rwxr-xr-xtest/functest/simulators/build_sim_image.sh8
-rw-r--r--test/functest/simulators/simulated-config/log.yml65
3 files changed, 55 insertions, 41 deletions
diff --git a/test/functest/simulators/Dockerfile b/test/functest/simulators/Dockerfile
index ca32895..233503c 100644
--- a/test/functest/simulators/Dockerfile
+++ b/test/functest/simulators/Dockerfile
@@ -17,19 +17,22 @@
# -------------------------------------------------------------------------
#
-FROM ubuntu:16.04
+FROM ubuntu:20.04
+
+ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y \
- && apt-get install -y vim unzip wget libmpfr-dev \
- && apt-get install -y git libqt5printsupport5 build-essential \
- && apt-get install -y python3 python3-setuptools python3-dev \
- && easy_install3 pip \
- && pip install --upgrade virtualenv pip wheel
+ && apt-get install -y --no-install-recommends software-properties-common \
+ curl ca-certificates vim binutils binfmt-support build-essential \
+ python3 python3-setuptools python3-dev \
+ && ln -s /usr/bin/python3.8 /usr/bin/python \
+ && curl -s https://bootstrap.pypa.io/get-pip.py | python \
+ && python -m pip --no-cache-dir install --upgrade pip wheel setuptools \
+ && rm -rf /var/lib/apt/lists/*
-RUN ln -s /usr/bin/python3.5 /usr/bin/python
-ADD requirements.txt /requirements.txt
+COPY requirements.txt /requirements.txt
RUN pip install -r requirements.txt
-ADD sim /sim
-ADD start_sim.sh /start_sim.sh
+COPY sim /sim
+COPY start_sim.sh /start_sim.sh
CMD ["/start_sim.sh"] \ No newline at end of file
diff --git a/test/functest/simulators/build_sim_image.sh b/test/functest/simulators/build_sim_image.sh
index c6bde2a..5d46ecb 100755
--- a/test/functest/simulators/build_sim_image.sh
+++ b/test/functest/simulators/build_sim_image.sh
@@ -18,7 +18,13 @@
# -------------------------------------------------------------------------
#
-SCRIPTDIR=$(dirname $(readlink -f $0))
+if [[ `uname` == "Darwin" ]]
+then
+ SCRIPTDIR=$(dirname $(greadlink -f $0))
+else
+ SCRIPTDIR=$(dirname $(readlink -f $0))
+fi
+
FUNC_TEST_DIR=$(dirname $SCRIPTDIR)
TEST_DIR=$(dirname $FUNC_TEST_DIR)
SIMULATORS_DIR=$FUNC_TEST_DIR/simulators
diff --git a/test/functest/simulators/simulated-config/log.yml b/test/functest/simulators/simulated-config/log.yml
index 0b8815f..ad0de21 100644
--- a/test/functest/simulators/simulated-config/log.yml
+++ b/test/functest/simulators/simulated-config/log.yml
@@ -3,19 +3,19 @@ disable_existing_loggers: True
loggers:
error:
- handlers: [error_handler]
+ handlers: [error_handler, console_handler]
level: "WARN"
propagate: True
debug:
- handlers: [debug_handler]
+ handlers: [debug_handler, console_handler]
level: "DEBUG"
propagate: True
metrics:
- handlers: [metrics_handler]
+ handlers: [metrics_handler, console_handler]
level: "INFO"
propagate: True
audit:
- handlers: [audit_handler]
+ handlers: [audit_handler, console_handler]
level: "INFO"
propagate: True
handlers:
@@ -59,37 +59,42 @@ handlers:
utc: True
delay: False
backupCount: 10
+ console_handler:
+ level: "DEBUG"
+ class: "logging.StreamHandler"
+ formatter: "metricsFormat"
+
formatters:
standard:
format: "%(asctime)s|||||%(name)s||%(thread)||%(funcName)s||%(levelname)s||%(message)s"
debugFormat:
- format: "%(asctime)s|||||%(name)s||%(thread)s||%(funcName)s||%(levelname)s||%(message)s||||%(mdc)s"
- mdcfmt: "{requestID} {threadID} {serverName} {serviceName} {instanceUUID} {upperLogLevel} {severity} {serverIPAddress} {server} {IPAddress} {className} {timer} {detailMessage}"
- datefmt: "%Y-%m-%d %H:%M:%S"
- (): onaplogging.mdcformatter.MDCFormatter
+ format: "%(mdc)s"
+ datefmt: "%Y-%m-%dT%H:%M:%S"
+ mdcfmt: "%(asctime)s.%(msecs)03d+00:00|{requestID}|%(threadName)s|{server}|%(levelname)s|%(message)s"
+ (): osdf.logging.oof_mdc_formatter.OOFMDCFormatter
errorFormat:
- format: "%(asctime)s|||||%(name)s||%(thread)s||%(funcName)s||%(levelname)s||%(message)s||||%(mdc)s"
- mdcfmt: "{requestID} {threadID} {serviceName} {partnerName} {targetEntity} {targetServiceName} {errorCode} {errorDescription} {detailMessage}"
- datefmt: "%Y-%m-%d %H:%M:%S"
- (): onaplogging.mdcformatter.MDCFormatter
+ format: "%(mdc)s"
+ datefmt: "%Y-%m-%dT%H:%M:%S"
+ mdcfmt: "%(asctime)s.%(msecs)03d+00:00|{requestID}|%(threadName)s|{serviceName}|{partnerName}\
+ |{targetEntity}|{targetServiceName}|%(levelname)s|{errorCode}|{errorDescription}|%(message)s"
+ (): osdf.logging.oof_mdc_formatter.OOFMDCFormatter
auditFormat:
- format: "%(asctime)s|||||%(name)s||%(thread)s||%(funcName)s||%(levelname)s||%(message)s||||%(mdc)s"
- mdcfmt: "{requestID} {serviceInstanceID} {threadID} {serverName} {serviceName} {partnerName} {statusCode} {responseCode} {responseDescription} {instanceUUID} {upperLogLevel} {severity} \
- {serverIPAddress} {timer} {server} {IPAddress} {className} {unused} {processKey} {customField1} {customField2} {customField3} {customField4} {detailMessage}"
- datefmt: "%Y-%m-%d %H:%M:%S"
- (): onaplogging.mdcformatter.MDCFormatter
+ format: "%(mdc)s"
+ datefmt: "%Y-%m-%dT%H:%M:%S"
+ mdcfmt: "{entryTimestamp}+00:00|%(asctime)s.%(msecs)03d+00:00|{requestID}|{serviceInstanceID}\
+ |%(threadName)s|{server}|{serviceName}|{partnerName}|{statusCode}|{responseCode}|{responseDescription}\
+ |{instanceUUID}|%(levelname)s|{severity}|{serverIPAddress}|{timer}|{server}|{IPAddress}||{unused}\
+ |{processKey}|{customField1}|{customField2}|{customField3}|{customField4}|%(message)s"
+ (): osdf.logging.oof_mdc_formatter.OOFMDCFormatter
metricsFormat:
- format: "%(asctime)s|||||%(name)s||%(thread)s||%(funcName)s||%(levelname)s||%(message)s||||%(mdc)s"
- mdcfmt: "{requestID} {serviceInstanceID} {threadID} {serverName} {serviceName} {partnerName} \
- {targetEntity} {targetServiceName} {statusCode} {responseCode} {responseDescription} \
- {instanceUUID} {upperLogLevel} {severity} {serverIPAddress} {timer} {server} {IPAddress} \
- {className} {unused} {processKey} {targetVirtualEntity} {customField1} {customField2} \
- {customField3} {customField4} {detailMessage}"
- datefmt: "%Y-%m-%d %H:%M:%S"
- (): onaplogging.mdcformatter.MDCFormatter
-
+ format: "%(mdc)s"
+ datefmt: "%Y-%m-%dT%H:%M:%S"
+ mdcfmt: "{entryTimestamp}+00:00|%(asctime)s.%(msecs)03d+00:00|{requestID}|{serviceInstanceID}\
+ |%(threadName)s|{server}|{serviceName}|{partnerName}|{targetEntity}|{targetServiceName}|{statusCode}|{responseCode}|{responseDescription}\
+ |{instanceUUID}|%(levelname)s|{severity}|{serverIPAddress}|{timer}|{server}|{IPAddress}||{unused}\
+ |{processKey}|{TargetVirtualEntity}|{customField1}|{customField2}|{customField3}|{customField4}|%(message)s"
+ (): osdf.logging.oof_mdc_formatter.OOFMDCFormatter
mdcFormat:
- format: "%(asctime)s|||||%(name)s||%(thread)s||%(funcName)s||%(levelname)s||%(message)s||||%(mdc)s"
- mdcfmt: "{requestID} {invocationID} {serviceName} {serviceIP}"
- datefmt: "%Y-%m-%d %H:%M:%S"
- (): onaplogging.mdcformatter.MDCFormatter
+ format: "%(asctime)s.%(msecs)03d+00:00|||||%(name)s||%(thread)s||%(funcName)s||%(levelname)s||%(message)s||||%(mdc)s"
+ mdcfmt: "{requestID} {invocationID} {serviceName} {serverIPAddress}"
+ (): osdf.logging.oof_mdc_formatter.OOFMDCFormatter