all tests logs
This commit is contained in:
parent
7d6750151b
commit
47c0d30604
4 changed files with 18 additions and 2 deletions
|
|
@ -32,6 +32,8 @@ RUN mkdir -p $CLEARING_HOME/files/xml/importer/in
|
|||
RUN mkdir -p $CLEARING_HOME/files/xml/importer/out
|
||||
RUN mkdir -p $CLEARING_HOME/files/xml/importer/error
|
||||
RUN mkdir -p $CLEARING_HOME/files/xml/exporter
|
||||
ARG CLR_TEST_NAME
|
||||
RUN mkdir -p $CLEARING_HOME_BIN/log/$CLR_TEST_NAME
|
||||
|
||||
WORKDIR $CLEARING_HOME
|
||||
RUN sed -i 's/\r$//' $CLEARING_HOME/*.sh
|
||||
|
|
|
|||
|
|
@ -16,6 +16,14 @@ sleep 30
|
|||
echo Run clearing-tester
|
||||
sh ./clearing_testing_utils/clearing-tester/clearing-tester.sh
|
||||
|
||||
if [ -n "$CLR_TEST_NAME" ] && [ -d "./bin/log" ]; then
|
||||
echo "Copying logs to ./bin/log/${CLR_TEST_NAME}"
|
||||
mkdir -p "./bin/log/${CLR_TEST_NAME}"
|
||||
rsync -av --exclude="${CLR_TEST_NAME}" "./bin/log/" "./bin/log/${CLR_TEST_NAME}/"
|
||||
else
|
||||
echo "CLR_TEST_NAME is not set or ./bin/log does not exist. Skipping log copy."
|
||||
fi
|
||||
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
echo "Tests passed successfully"
|
||||
|
|
|
|||
|
|
@ -19,7 +19,12 @@ services:
|
|||
retries: 100
|
||||
|
||||
clearing_system:
|
||||
build: ./clearing-all
|
||||
build:
|
||||
- context: ./clearing-all
|
||||
- args:
|
||||
- CLR_TEST_NAME=${CLR_TEST_NAME}
|
||||
environment:
|
||||
- CLR_TEST_NAME=${CLR_TEST_NAME}
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
|
@ -35,7 +40,7 @@ services:
|
|||
- "8080:8080"
|
||||
volumes:
|
||||
- ./mnt/results:/opt/clearing/clearing_testing_utils/store/results
|
||||
- logs_volume:/opt/clearing/bin/log
|
||||
- logs_volume:/opt/clearing/bin/log/${CLR_TEST_NAME}
|
||||
- ./mnt/logs/tester:/opt/clearing/clearing_testing_utils/clearing-tester/logs
|
||||
- ./mnt/logs/converter:/opt/clearing/clearing_testing_utils/clearing-converter/logs
|
||||
# - ./mnt/dbfout:/opt/clearing/files/dbf/exporter/
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ RESULT_FILES_DIR = os.environ['RESULT_FILES_DIR']
|
|||
|
||||
def run_docker(folder_name):
|
||||
logging.info(f"Running docker-compose for {folder_name}")
|
||||
os.environ['CLR_TEST_NAME'] = folder_name
|
||||
os.chdir("clr_test")
|
||||
subprocess.call('docker rm -f $(docker ps --all -q --filter ancestor=clr_test-db)', shell=True)
|
||||
subprocess.call('docker rm -f $(docker ps --all -q --filter ancestor=clr_test-clearing_system)', shell=True)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue