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.

Files changed (56) hide show
  1. holado/common/context/session_context.py +6 -5
  2. {holado-0.8.4.dist-info → holado-0.9.1.dist-info}/METADATA +1 -1
  3. {holado-0.8.4.dist-info → holado-0.9.1.dist-info}/RECORD +56 -41
  4. holado_core/common/block/base.py +3 -3
  5. holado_core/common/resource/persisted_data_manager.py +10 -10
  6. holado_core/common/resource/resource_manager.py +34 -37
  7. holado_core/common/resource/table_data_manager.py +110 -0
  8. holado_core/common/tools/path_manager.py +31 -6
  9. holado_django/server/django_projects/rest_api/rest_api/urls.py +1 -1
  10. holado_docker/tests/behave/steps/tools/docker_controller/client_steps.py +2 -2
  11. holado_docker/tools/docker_controller/client/rest/docker_controller_client.py +38 -1
  12. holado_docker/tools/docker_controller/server/run_docker_controller_in_docker.sh +3 -3
  13. holado_examples/tests/behave/testing_solution/environment.py +3 -3
  14. holado_examples/tests/behave/testing_solution/src/context/session_context.py +2 -2
  15. holado_examples/tests/behave/testing_solution/steps/config_steps.py +1 -1
  16. holado_multitask/multithreading/loopthread.py +4 -4
  17. holado_python/common/tools/datetime.py +37 -16
  18. holado_python/standard_library/ssl/resources/certificates/tcpbin.crt +16 -16
  19. holado_python/standard_library/ssl/resources/certificates/tcpbin.key +26 -26
  20. holado_python/tests/behave/steps/standard_library/datetime_steps.py +2 -2
  21. holado_rabbitmq/tools/rabbitmq/rabbitmq_manager.py +3 -3
  22. holado_report/__init__.py +1 -0
  23. holado_report/campaign/campaign_manager.py +194 -0
  24. holado_report/report/builders/detailed_scenario_failed_report_builder.py +11 -7
  25. holado_report/report/builders/failure_report_builder.py +4 -3
  26. holado_report/report/builders/short_scenario_failed_report_builder.py +6 -5
  27. holado_report/report/builders/summary_report_builder.py +1 -1
  28. holado_report/report/builders/summary_scenario_failed_report_builder.py +6 -5
  29. holado_report/report/builders/summary_scenario_report_builder.py +12 -11
  30. holado_report/report/execution_historic.py +4 -2
  31. holado_report/report/report_manager.py +65 -13
  32. holado_rest/api/rest/rest_client.py +5 -1
  33. holado_system/system/filesystem/file.py +5 -2
  34. holado_test/__init__.py +3 -0
  35. holado_test/common/context/feature_context.py +3 -3
  36. holado_test/common/context/scenario_context.py +3 -3
  37. holado_test/common/context/step_context.py +3 -3
  38. holado_test/test_server/client/rest/test_server_client.py +117 -0
  39. holado_test/test_server/server/Dockerfile +70 -0
  40. holado_test/test_server/server/core/server_context.py +42 -0
  41. holado_test/test_server/server/core/server_manager.py +54 -0
  42. holado_test/test_server/server/requirements.txt +2 -0
  43. holado_test/test_server/server/rest/README +2 -0
  44. holado_test/test_server/server/rest/api/__init__.py +23 -0
  45. holado_docker/tools/docker_controller/docker_controller_manager.py → holado_test/test_server/server/rest/api/campaign/__init__.py +10 -28
  46. holado_test/test_server/server/rest/api/campaign/scenario.py +33 -0
  47. holado_test/test_server/server/rest/initialize_holado.py +72 -0
  48. holado_test/test_server/server/rest/logging.conf +50 -0
  49. holado_test/test_server/server/rest/openapi.yaml +46 -0
  50. holado_test/test_server/server/rest/run.py +40 -0
  51. holado_test/test_server/server/run_test_server_in_docker.sh +101 -0
  52. holado_value/common/tools/unique_value_manager.py +2 -1
  53. test_holado/environment.py +1 -1
  54. test_holado/logging.conf +1 -0
  55. {holado-0.8.4.dist-info → holado-0.9.1.dist-info}/WHEEL +0 -0
  56. {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((datetime.now() - datetime(2020, 1, 1)).total_seconds()) - 1
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
@@ -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
@@ -36,6 +36,7 @@ holado_s3.tools.s3.minio_client.trace=INFO
36
36
 
37
37
  #holado_system=DEBUG
38
38
  #holado_test.behave.behave=DEBUG
39
+ holado_test.test_server=DEBUG
39
40
  #holado_yaml=DEBUG
40
41
 
41
42
  # External libraries
File without changes