holado 0.8.4__py3-none-any.whl → 0.9.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of holado might be problematic. Click here for more details.
- holado/common/context/session_context.py +6 -5
- {holado-0.8.4.dist-info → holado-0.9.1.dist-info}/METADATA +1 -1
- {holado-0.8.4.dist-info → holado-0.9.1.dist-info}/RECORD +56 -41
- holado_core/common/block/base.py +3 -3
- holado_core/common/resource/persisted_data_manager.py +10 -10
- holado_core/common/resource/resource_manager.py +34 -37
- holado_core/common/resource/table_data_manager.py +110 -0
- holado_core/common/tools/path_manager.py +31 -6
- holado_django/server/django_projects/rest_api/rest_api/urls.py +1 -1
- holado_docker/tests/behave/steps/tools/docker_controller/client_steps.py +2 -2
- holado_docker/tools/docker_controller/client/rest/docker_controller_client.py +38 -1
- holado_docker/tools/docker_controller/server/run_docker_controller_in_docker.sh +3 -3
- holado_examples/tests/behave/testing_solution/environment.py +3 -3
- holado_examples/tests/behave/testing_solution/src/context/session_context.py +2 -2
- holado_examples/tests/behave/testing_solution/steps/config_steps.py +1 -1
- holado_multitask/multithreading/loopthread.py +4 -4
- holado_python/common/tools/datetime.py +37 -16
- holado_python/standard_library/ssl/resources/certificates/tcpbin.crt +16 -16
- holado_python/standard_library/ssl/resources/certificates/tcpbin.key +26 -26
- holado_python/tests/behave/steps/standard_library/datetime_steps.py +2 -2
- holado_rabbitmq/tools/rabbitmq/rabbitmq_manager.py +3 -3
- holado_report/__init__.py +1 -0
- holado_report/campaign/campaign_manager.py +194 -0
- holado_report/report/builders/detailed_scenario_failed_report_builder.py +11 -7
- holado_report/report/builders/failure_report_builder.py +4 -3
- holado_report/report/builders/short_scenario_failed_report_builder.py +6 -5
- holado_report/report/builders/summary_report_builder.py +1 -1
- holado_report/report/builders/summary_scenario_failed_report_builder.py +6 -5
- holado_report/report/builders/summary_scenario_report_builder.py +12 -11
- holado_report/report/execution_historic.py +4 -2
- holado_report/report/report_manager.py +65 -13
- holado_rest/api/rest/rest_client.py +5 -1
- holado_system/system/filesystem/file.py +5 -2
- holado_test/__init__.py +3 -0
- holado_test/common/context/feature_context.py +3 -3
- holado_test/common/context/scenario_context.py +3 -3
- holado_test/common/context/step_context.py +3 -3
- holado_test/test_server/client/rest/test_server_client.py +117 -0
- holado_test/test_server/server/Dockerfile +70 -0
- holado_test/test_server/server/core/server_context.py +42 -0
- holado_test/test_server/server/core/server_manager.py +54 -0
- holado_test/test_server/server/requirements.txt +2 -0
- holado_test/test_server/server/rest/README +2 -0
- holado_test/test_server/server/rest/api/__init__.py +23 -0
- holado_docker/tools/docker_controller/docker_controller_manager.py → holado_test/test_server/server/rest/api/campaign/__init__.py +10 -28
- holado_test/test_server/server/rest/api/campaign/scenario.py +33 -0
- holado_test/test_server/server/rest/initialize_holado.py +72 -0
- holado_test/test_server/server/rest/logging.conf +50 -0
- holado_test/test_server/server/rest/openapi.yaml +46 -0
- holado_test/test_server/server/rest/run.py +40 -0
- holado_test/test_server/server/run_test_server_in_docker.sh +101 -0
- holado_value/common/tools/unique_value_manager.py +2 -1
- test_holado/environment.py +1 -1
- test_holado/logging.conf +1 -0
- {holado-0.8.4.dist-info → holado-0.9.1.dist-info}/WHEEL +0 -0
- {holado-0.8.4.dist-info → holado-0.9.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Script to launch Test Server as a docker image.
|
|
4
|
+
#
|
|
5
|
+
# Test Server exposes a REST API for some docker commands.
|
|
6
|
+
# It is accessible on localhost, and also on a docker network if HOLADO_NETWORK is defined.
|
|
7
|
+
# On all networks, API is accessible on same port (HOLADO_TEST_SERVER_PORT or 8001).
|
|
8
|
+
#
|
|
9
|
+
# REST API specification is in file rest/openapi.yaml.
|
|
10
|
+
#
|
|
11
|
+
# REQUIREMENTS:
|
|
12
|
+
# Have access to any HolAdo registry.
|
|
13
|
+
#
|
|
14
|
+
# Optionally, define in .profile the following variables
|
|
15
|
+
# - HOLADO_TEST_SERVER_HOST: host of test-server, or name of its container
|
|
16
|
+
# - HOLADO_TEST_SERVER_PORT: REST API port to use (default: 51232)
|
|
17
|
+
# - HOLADO_IMAGE_REGISTRY: docker image registry to use (default: holado/test_server)
|
|
18
|
+
# - HOLADO_IMAGE_TAG: docker image tag to use (default: latest)
|
|
19
|
+
# - HOLADO_OUTPUT_BASEDIR: absolute path to base output directory (default: [HOME]/.holado/output)
|
|
20
|
+
# - HOLADO_USE_LOCALHOST: force the container network to 'host'.
|
|
21
|
+
# - HOLADO_NETWORK: specify on which network the docker is run.
|
|
22
|
+
#
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
WORK_DIR="$(pwd)"
|
|
26
|
+
|
|
27
|
+
if [[ -z "$HOLADO_IMAGE_REGISTRY" ]]; then
|
|
28
|
+
HOLADO_IMAGE_REGISTRY=holado/test_server
|
|
29
|
+
fi
|
|
30
|
+
if [[ -z "$HOLADO_IMAGE_TAG" ]]; then
|
|
31
|
+
HOLADO_IMAGE_TAG=latest
|
|
32
|
+
fi
|
|
33
|
+
SERVER_IMAGE=${HOLADO_IMAGE_REGISTRY}:${HOLADO_IMAGE_TAG}
|
|
34
|
+
|
|
35
|
+
# Update docker image
|
|
36
|
+
echo "Updating docker image ${SERVER_IMAGE}..."
|
|
37
|
+
docker pull ${SERVER_IMAGE}
|
|
38
|
+
|
|
39
|
+
# Define test output directory
|
|
40
|
+
if [[ ! -z "$HOLADO_OUTPUT_BASEDIR" ]]; then
|
|
41
|
+
OUTPUT_DIR=${HOLADO_OUTPUT_BASEDIR}
|
|
42
|
+
else
|
|
43
|
+
OUTPUT_DIR=${HOME}/.holado/output
|
|
44
|
+
fi
|
|
45
|
+
echo "Output directory: $OUTPUT_DIR"
|
|
46
|
+
|
|
47
|
+
# Define test resources directory
|
|
48
|
+
if [[ ! -z "$HOLADO_LOCAL_RESOURCES_BASEDIR" ]]; then
|
|
49
|
+
RESOURCES_DIR=${HOLADO_LOCAL_RESOURCES_BASEDIR}
|
|
50
|
+
else
|
|
51
|
+
RESOURCES_DIR=${HOME}/.holado/resources
|
|
52
|
+
fi
|
|
53
|
+
echo "Resources directory: $RESOURCES_DIR"
|
|
54
|
+
|
|
55
|
+
# Make dirs
|
|
56
|
+
if [ ! -d ${OUTPUT_DIR} ]; then
|
|
57
|
+
echo "Create output directory: ${OUTPUT_DIR}"
|
|
58
|
+
mkdir -p ${OUTPUT_DIR}
|
|
59
|
+
fi
|
|
60
|
+
if [ ! -d ${RESOURCES_DIR} ]; then
|
|
61
|
+
echo "Create resources directory: ${RESOURCES_DIR}"
|
|
62
|
+
mkdir -p ${RESOURCES_DIR}
|
|
63
|
+
fi
|
|
64
|
+
|
|
65
|
+
# Define container network
|
|
66
|
+
if [ "$HOLADO_USE_LOCALHOST" = True ]; then
|
|
67
|
+
NETWORK_DEF_COMMAND="--network=host"
|
|
68
|
+
else
|
|
69
|
+
if [[ ! -z "$HOLADO_NETWORK" ]]; then
|
|
70
|
+
NETWORK_DEF_COMMAND="--network $HOLADO_NETWORK"
|
|
71
|
+
else
|
|
72
|
+
NETWORK_DEF_COMMAND=""
|
|
73
|
+
fi
|
|
74
|
+
fi
|
|
75
|
+
|
|
76
|
+
# Define port to use
|
|
77
|
+
if [[ -z "$HOLADO_TEST_SERVER_PORT" ]]; then
|
|
78
|
+
HOLADO_TEST_SERVER_PORT=51232
|
|
79
|
+
fi
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
# Docker run
|
|
83
|
+
if [[ -z "$HOLADO_TEST_SERVER_HOST" ]]; then
|
|
84
|
+
HOLADO_TEST_SERVER_HOST=holado_test_server
|
|
85
|
+
fi
|
|
86
|
+
|
|
87
|
+
echo
|
|
88
|
+
echo "Running Test Server (docker name: ${HOLADO_TEST_SERVER_HOST})..."
|
|
89
|
+
echo " port: ${HOLADO_TEST_SERVER_PORT}"
|
|
90
|
+
#echo " NETWORK_DEF_COMMAND=${NETWORK_DEF_COMMAND}"
|
|
91
|
+
echo
|
|
92
|
+
docker run --rm --user root --name ${HOLADO_TEST_SERVER_HOST} \
|
|
93
|
+
-v "${OUTPUT_DIR}":/output \
|
|
94
|
+
-v "${RESOURCES_DIR}":/resources \
|
|
95
|
+
-e HOLADO_OUTPUT_BASEDIR=/output \
|
|
96
|
+
-e HOLADO_LOCAL_RESOURCES_BASEDIR=/resources \
|
|
97
|
+
-e HOLADO_TEST_SERVER_PORT=${HOLADO_TEST_SERVER_PORT} \
|
|
98
|
+
${NETWORK_DEF_COMMAND} \
|
|
99
|
+
-p ${HOLADO_TEST_SERVER_PORT}:${HOLADO_TEST_SERVER_PORT} \
|
|
100
|
+
${SERVER_IMAGE}
|
|
101
|
+
|
|
@@ -17,6 +17,7 @@ from datetime import datetime
|
|
|
17
17
|
import string
|
|
18
18
|
from holado_core.common.exceptions.technical_exception import TechnicalException
|
|
19
19
|
from holado_core.common.tools.tools import Tools
|
|
20
|
+
from holado_python.common.tools.datetime import DateTime
|
|
20
21
|
|
|
21
22
|
logger = logging.getLogger(__name__)
|
|
22
23
|
|
|
@@ -41,7 +42,7 @@ class UniqueValueManager(object):
|
|
|
41
42
|
def new_integer(self, do_log=True):
|
|
42
43
|
if self.__last_unique_int is None:
|
|
43
44
|
# Compute timestamp as number of seconds since 01/01/2016
|
|
44
|
-
self.__last_unique_int = int((
|
|
45
|
+
self.__last_unique_int = int((DateTime.now(tz=None) - datetime(2020, 1, 1)).total_seconds()) - 1
|
|
45
46
|
|
|
46
47
|
self.__last_unique_int += 1
|
|
47
48
|
res = self.__last_unique_int
|
test_holado/environment.py
CHANGED
|
@@ -22,7 +22,7 @@ here = os.path.abspath(os.path.dirname(__file__))
|
|
|
22
22
|
sys.path.insert(0, here)
|
|
23
23
|
|
|
24
24
|
# Add HolAdo source paths (needed when using a clone of HolAdo project)
|
|
25
|
-
from initialize_holado import insert_holado_source_paths
|
|
25
|
+
from initialize_holado import insert_holado_source_paths # @UnresolvedImport
|
|
26
26
|
insert_holado_source_paths()
|
|
27
27
|
|
|
28
28
|
|
test_holado/logging.conf
CHANGED
|
File without changes
|
|
File without changes
|