aplos-nca-saas-sdk 0.0.6__tar.gz → 0.0.7__tar.gz
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.
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/PKG-INFO +1 -1
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/pyproject.toml +1 -1
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/integration_test_base.py +19 -1
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/integration_test_suite.py +20 -12
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/main.py +6 -2
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/tests/app_login_test.py +1 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/version.py +1 -1
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/.gitignore +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/.pypirc +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/.vscode/launch.json +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/.vscode/settings.json +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/LICENSE +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/README.md +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/devops/pypi/build.py +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/devops/pypi/readme.md +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/devops/requirements.txt +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/docs/images/API_Configuration_blur.png +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/docs/images/aplos-nca-commandline-cropped.png +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/docs/images/aplos-nca-commandline.png +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/mypy.ini +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/mypy_checks.py +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/readme.md +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/requirements.txt +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/run-checks.sh +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/__init__.py +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/aws_resources/aws_cognito.py +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/aws_resources/aws_s3_presigned_payload.py +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/aws_resources/aws_s3_presigned_upload.py +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/files/analysis_files/single_ev/configuration_single_ev.json +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/files/analysis_files/single_ev/meta_data.json +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/files/analysis_files/single_ev/single_ev.csv +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/configs/_config_base.py +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/configs/app_settings.py +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/configs/config_sample.json +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/configs/login.py +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/integration_test_configurations.py +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/integration_test_factory.py +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/integration_test_response.py +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/readme.md +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/tests/app_configuration_test.py +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/tests/app_execution_test.py +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/tests/app_validation_test.py +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/nca_resources/nca_app_configuration.py +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/nca_resources/nca_endpoints.py +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/nca_resources/nca_executions.py +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/nca_resources/nca_login.py +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/utilities/commandline_args.py +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/utilities/environment_services.py +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/utilities/environment_vars.py +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/utilities/http_utility.py +0 -0
- {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/tests/__init__.py +0 -0
@@ -55,7 +55,25 @@ class IntegrationTestBase:
|
|
55
55
|
"""
|
56
56
|
Returns True if all tests in the suite were successful
|
57
57
|
"""
|
58
|
-
return all([result.
|
58
|
+
return all([result.error is None for result in self.results])
|
59
|
+
|
60
|
+
def skipped_count(self) -> int:
|
61
|
+
"""
|
62
|
+
Gets the number of tests that were skipped
|
63
|
+
"""
|
64
|
+
return len([result for result in self.results if result.skipped])
|
65
|
+
|
66
|
+
def error_count(self) -> int:
|
67
|
+
"""
|
68
|
+
Gets the number of tests that resulted in an error
|
69
|
+
"""
|
70
|
+
return len([result for result in self.results if result.error is not None])
|
71
|
+
|
72
|
+
def errors(self) -> List[str]:
|
73
|
+
"""
|
74
|
+
Gets the list of errors that occurred during the test
|
75
|
+
"""
|
76
|
+
return [result.error for result in self.results if result.error is not None]
|
59
77
|
|
60
78
|
def test(self) -> bool:
|
61
79
|
"""
|
@@ -42,9 +42,10 @@ class IntegrationTestSuite:
|
|
42
42
|
test.config = test_config
|
43
43
|
test_result: Dict[str, Any] = {
|
44
44
|
"test_name": test.name,
|
45
|
-
"success":
|
46
|
-
"
|
47
|
-
"
|
45
|
+
"success": 0,
|
46
|
+
"errors": [],
|
47
|
+
"skipped_count": 0,
|
48
|
+
"error_count": 0,
|
48
49
|
"start_time_utc": None,
|
49
50
|
"end_time_utc": None,
|
50
51
|
}
|
@@ -55,10 +56,17 @@ class IntegrationTestSuite:
|
|
55
56
|
success = test.test()
|
56
57
|
test_result["success"] = success
|
57
58
|
test_result["results"] = test.results
|
59
|
+
test_result["skipped_count"] = test.skipped_count()
|
60
|
+
test_result["error_count"] = test.error_count()
|
61
|
+
test_result["errors"] = test.errors()
|
62
|
+
if not success:
|
63
|
+
if self.fail_fast:
|
64
|
+
# just break and let the failure routine handle it
|
65
|
+
break
|
58
66
|
|
59
67
|
except Exception as e: # pylint: disable=broad-except
|
60
68
|
test_result["success"] = False
|
61
|
-
test_result["
|
69
|
+
test_result["errors"] = [str(e)]
|
62
70
|
if self.fail_fast:
|
63
71
|
# just break and let the failure routine handle it
|
64
72
|
break
|
@@ -72,7 +80,7 @@ class IntegrationTestSuite:
|
|
72
80
|
else:
|
73
81
|
logger.error(test_result)
|
74
82
|
# find the failures
|
75
|
-
failures = [test for test in self.test_results if
|
83
|
+
failures = [test for test in self.test_results if len(test["errors"]) > 0]
|
76
84
|
self.__print_results(start_time, failures)
|
77
85
|
|
78
86
|
# print the results
|
@@ -86,19 +94,19 @@ class IntegrationTestSuite:
|
|
86
94
|
|
87
95
|
def __print_results(self, start_time: datetime, failures: List[Dict[str, Any]]):
|
88
96
|
print("Test Results:")
|
97
|
+
skipped = sum([test["skipped_count"] for test in self.test_results])
|
98
|
+
|
89
99
|
for test_result in self.test_results:
|
90
100
|
duration = test_result["end_time_utc"] - test_result["start_time_utc"]
|
91
101
|
print(
|
92
102
|
f" {test_result['test_name']} {'succeeded' if test_result['success'] else 'failed'} duration: {duration}"
|
93
103
|
)
|
94
104
|
if not test_result["success"]:
|
95
|
-
print(f" Error: {test_result['
|
105
|
+
print(f" Error: {test_result['errors']}")
|
96
106
|
|
97
107
|
print(f"Test Suite completed in {datetime.now(UTC) - start_time}")
|
98
108
|
|
99
|
-
print(f"Total Tests: {len(self.test_results)}")
|
100
|
-
print(f"Successful
|
101
|
-
print(f"
|
102
|
-
print(
|
103
|
-
f"Skipped Tests: {len([test for test in self.test_results if test['skipped']])}"
|
104
|
-
)
|
109
|
+
print(f" Total Tests: {len(self.test_results)}")
|
110
|
+
print(f" Successful: {len(self.test_results) - len(failures) - skipped}")
|
111
|
+
print(f" Skipped: {skipped}")
|
112
|
+
print(f" Failed: {len(failures)}")
|
@@ -29,12 +29,16 @@ def main():
|
|
29
29
|
|
30
30
|
# normally we'd pull a test configuration file from Secrets Manager, Parameter Store, or some other secure location
|
31
31
|
# here we're going to pull the sample file and then override some it's values.
|
32
|
-
config_file = os.path.join(
|
32
|
+
config_file = os.path.join(
|
33
|
+
Path(__file__).parent,
|
34
|
+
"configs",
|
35
|
+
os.getenv("TEST_CONFIG_FILE") or "config_sample.json",
|
36
|
+
)
|
33
37
|
# load it so we can see what it looks like
|
34
38
|
config.load(file_path=config_file)
|
35
39
|
|
36
40
|
# override the configuration
|
37
|
-
override_config(config)
|
41
|
+
# override_config(config)
|
38
42
|
|
39
43
|
its.test(test_config=config)
|
40
44
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/docs/images/API_Configuration_blur.png
RENAMED
File without changes
|
{aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/docs/images/aplos-nca-commandline-cropped.png
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|