pybuilder-integration 99__tar.gz → 102__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.
- {pybuilder-integration-99 → pybuilder_integration-102}/PKG-INFO +4 -1
- {pybuilder-integration-99 → pybuilder_integration-102}/pybuilder_integration/__init__.py +3 -0
- {pybuilder-integration-99 → pybuilder_integration-102}/pybuilder_integration/artifact_manager.py +11 -2
- {pybuilder-integration-99 → pybuilder_integration-102}/pybuilder_integration/properties.py +2 -0
- {pybuilder-integration-99 → pybuilder_integration-102}/pybuilder_integration/tasks.py +3 -1
- {pybuilder-integration-99 → pybuilder_integration-102}/pybuilder_integration.egg-info/PKG-INFO +4 -1
- {pybuilder-integration-99 → pybuilder_integration-102}/setup.py +1 -1
- {pybuilder-integration-99 → pybuilder_integration-102}/pybuilder_integration/cloudwatchlogs_utility.py +0 -0
- {pybuilder-integration-99 → pybuilder_integration-102}/pybuilder_integration/directory_utility.py +0 -0
- {pybuilder-integration-99 → pybuilder_integration-102}/pybuilder_integration/exec_utility.py +0 -0
- {pybuilder-integration-99 → pybuilder_integration-102}/pybuilder_integration/tool_utility.py +0 -0
- {pybuilder-integration-99 → pybuilder_integration-102}/pybuilder_integration.egg-info/SOURCES.txt +0 -0
- {pybuilder-integration-99 → pybuilder_integration-102}/pybuilder_integration.egg-info/dependency_links.txt +0 -0
- {pybuilder-integration-99 → pybuilder_integration-102}/pybuilder_integration.egg-info/namespace_packages.txt +0 -0
- {pybuilder-integration-99 → pybuilder_integration-102}/pybuilder_integration.egg-info/requires.txt +0 -0
- {pybuilder-integration-99 → pybuilder_integration-102}/pybuilder_integration.egg-info/top_level.txt +0 -0
- {pybuilder-integration-99 → pybuilder_integration-102}/pybuilder_integration.egg-info/zip-safe +0 -0
- {pybuilder-integration-99 → pybuilder_integration-102}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pybuilder-integration
|
|
3
|
-
Version:
|
|
3
|
+
Version: 102
|
|
4
4
|
Summary: A pybuilder plugin that runs integration tests (Tavern & Cypress) against a target.
|
|
5
5
|
Home-page: https://github.com/rspitler/pybuilder-integration
|
|
6
6
|
Author:
|
|
@@ -10,5 +10,8 @@ Maintainer-email:
|
|
|
10
10
|
License: Apache 2.0
|
|
11
11
|
Classifier: Development Status :: 3 - Alpha
|
|
12
12
|
Classifier: Programming Language :: Python
|
|
13
|
+
Requires-Dist: pytest
|
|
14
|
+
Requires-Dist: tavern==1.25.2
|
|
15
|
+
Requires-Dist: boto3
|
|
13
16
|
|
|
14
17
|
A pybuilder plugin that runs integration tests against a target. This is intended to be a broader scope than unit-tests encompassing dependant functionality.
|
|
@@ -25,7 +25,9 @@ def init_plugin(project):
|
|
|
25
25
|
f"\t2. Run integration tests found in 'LATEST-{ENVIRONMENT}' managed by ${ARTIFACT_MANAGER}\n"
|
|
26
26
|
f"\t3. Promote current build integration tests to 'LATEST-{ENVIRONMENT}' (disable with ${PROMOTE_ARTIFACT})\n"
|
|
27
27
|
f"\t${INTEGRATION_TARGET_URL} - (required) Full URL target for tests\n"
|
|
28
|
+
f"\t${INTEGRATION_PUBLIC_TARGET_URL} - (required) Full public URL target for tests\n"
|
|
28
29
|
f"\t${ENVIRONMENT} - (required) Environment that is being tested (ci/prod)\n"
|
|
30
|
+
f"\t${TESTING_SCOPE} - (optional) Will limit scope of tests, default is to the same application - * can be used.\n"
|
|
29
31
|
f"\t${PROMOTE_ARTIFACT} - Promote integration tests to LATEST-${ENVIRONMENT} (default TRUE)\n"
|
|
30
32
|
)
|
|
31
33
|
def verify_environment(project: Project, logger: Logger, reactor: Reactor):
|
|
@@ -34,6 +36,7 @@ def verify_environment(project: Project, logger: Logger, reactor: Reactor):
|
|
|
34
36
|
|
|
35
37
|
@task(description="Run integration tests using a cypress spec. Requires NPM installed.\n"
|
|
36
38
|
f"\t{INTEGRATION_TARGET_URL} - (required) Full URL target for cypress tests\n"
|
|
39
|
+
f"\t{INTEGRATION_PUBLIC_TARGET_URL} - (required) Full public URL target for cypress tests\n"
|
|
37
40
|
f"\t{CYPRESS_TEST_DIR} - directory for test specification (src/integrationtest/cypress)\n"
|
|
38
41
|
)
|
|
39
42
|
def verify_cypress(project: Project, logger: Logger, reactor: Reactor):
|
{pybuilder-integration-99 → pybuilder_integration-102}/pybuilder_integration/artifact_manager.py
RENAMED
|
@@ -174,13 +174,22 @@ def extract_application_role(logger, project):
|
|
|
174
174
|
return app_group, app_name, role
|
|
175
175
|
|
|
176
176
|
|
|
177
|
+
def in_scope(scope, filename):
|
|
178
|
+
if scope == "*": return True
|
|
179
|
+
return scope in filename
|
|
180
|
+
|
|
181
|
+
|
|
177
182
|
def _unzip_downloaded_artifacts(dir_with_zips: str, destination: str, logger: Logger, project:Project) -> str:
|
|
183
|
+
scope = project.get_property(TESTING_SCOPE,project.get_property(APPLICATION,'*'))
|
|
178
184
|
for file in os.listdir(dir_with_zips):
|
|
179
185
|
# expect {tool}-{self.project.name}.zip
|
|
180
|
-
|
|
186
|
+
filename = os.path.basename(file)
|
|
187
|
+
if not in_scope(scope, filename):
|
|
188
|
+
continue
|
|
189
|
+
if filename.find("tavern") >= 0:
|
|
181
190
|
shutil.unpack_archive(filename=os.path.join(dir_with_zips, file), extract_dir=f"{destination}/tavern",
|
|
182
191
|
format="zip")
|
|
183
|
-
elif
|
|
192
|
+
elif filename.find("cypress") >= 0:
|
|
184
193
|
shutil.unpack_archive(filename=os.path.join(dir_with_zips, file), extract_dir=f"{destination}/cypress",
|
|
185
194
|
format="zip")
|
|
186
195
|
else:
|
|
@@ -5,6 +5,7 @@ ARTIFACT_MANAGER = "integration_artifact_manager"
|
|
|
5
5
|
CYPRESS_TEST_DIR = "cypress_test_dir"
|
|
6
6
|
CYPRESS_CONFIG_FILE = "cypress_config_file"
|
|
7
7
|
INTEGRATION_TARGET_URL = "integration_target_url"
|
|
8
|
+
INTEGRATION_PUBLIC_TARGET_URL = "integration_public_target_url"
|
|
8
9
|
TAVERN_ADDITIONAL_ARGS = "tavern_addition_args"
|
|
9
10
|
WORKING_TEST_DIR = "verify_environment_new_test_dir"
|
|
10
11
|
TAVERN_TEST_DIR = "tavern_test_dir"
|
|
@@ -16,3 +17,4 @@ APPLICATION = "application"
|
|
|
16
17
|
APPLICATION_GROUP = "application_group"
|
|
17
18
|
RUN_PARALLEL = "pytest_parallel"
|
|
18
19
|
CONSOLIDATE_TESTS = "consolidate_tavern"
|
|
20
|
+
TESTING_SCOPE = "testing_scope"
|
|
@@ -214,8 +214,10 @@ def _run_tavern_tests_in_dir(test_dir: str, logger: Logger, project: Project, re
|
|
|
214
214
|
if project.get_property(RUN_PARALLEL, False):
|
|
215
215
|
args.extend(['-n', 'auto'])
|
|
216
216
|
os.environ['TARGET'] = project.get_property(INTEGRATION_TARGET_URL)
|
|
217
|
+
os.environ['PUBLIC_TARGET'] = project.get_property(INTEGRATION_PUBLIC_TARGET_URL)
|
|
217
218
|
os.environ[ENVIRONMENT] = project.get_property(ENVIRONMENT)
|
|
218
|
-
logger.info(f"Running against: {project.get_property(INTEGRATION_TARGET_URL)} "
|
|
219
|
+
logger.info(f"Running against target: {project.get_property(INTEGRATION_TARGET_URL)} and "
|
|
220
|
+
f"public target: {project.get_property(INTEGRATION_PUBLIC_TARGET_URL)}")
|
|
219
221
|
cache_wd = os.getcwd()
|
|
220
222
|
try:
|
|
221
223
|
os.chdir(test_dir)
|
{pybuilder-integration-99 → pybuilder_integration-102}/pybuilder_integration.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pybuilder-integration
|
|
3
|
-
Version:
|
|
3
|
+
Version: 102
|
|
4
4
|
Summary: A pybuilder plugin that runs integration tests (Tavern & Cypress) against a target.
|
|
5
5
|
Home-page: https://github.com/rspitler/pybuilder-integration
|
|
6
6
|
Author:
|
|
@@ -10,5 +10,8 @@ Maintainer-email:
|
|
|
10
10
|
License: Apache 2.0
|
|
11
11
|
Classifier: Development Status :: 3 - Alpha
|
|
12
12
|
Classifier: Programming Language :: Python
|
|
13
|
+
Requires-Dist: pytest
|
|
14
|
+
Requires-Dist: tavern==1.25.2
|
|
15
|
+
Requires-Dist: boto3
|
|
13
16
|
|
|
14
17
|
A pybuilder plugin that runs integration tests against a target. This is intended to be a broader scope than unit-tests encompassing dependant functionality.
|
|
@@ -21,7 +21,7 @@ class install(_install):
|
|
|
21
21
|
if __name__ == '__main__':
|
|
22
22
|
setup(
|
|
23
23
|
name = 'pybuilder-integration',
|
|
24
|
-
version = '
|
|
24
|
+
version = '102',
|
|
25
25
|
description = 'A pybuilder plugin that runs integration tests (Tavern & Cypress) against a target.',
|
|
26
26
|
long_description = 'A pybuilder plugin that runs integration tests against a target. This is intended to be a broader scope than unit-tests encompassing dependant functionality.',
|
|
27
27
|
long_description_content_type = None,
|
|
File without changes
|
{pybuilder-integration-99 → pybuilder_integration-102}/pybuilder_integration/directory_utility.py
RENAMED
|
File without changes
|
{pybuilder-integration-99 → pybuilder_integration-102}/pybuilder_integration/exec_utility.py
RENAMED
|
File without changes
|
{pybuilder-integration-99 → pybuilder_integration-102}/pybuilder_integration/tool_utility.py
RENAMED
|
File without changes
|
{pybuilder-integration-99 → pybuilder_integration-102}/pybuilder_integration.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pybuilder-integration-99 → pybuilder_integration-102}/pybuilder_integration.egg-info/requires.txt
RENAMED
|
File without changes
|
{pybuilder-integration-99 → pybuilder_integration-102}/pybuilder_integration.egg-info/top_level.txt
RENAMED
|
File without changes
|
{pybuilder-integration-99 → pybuilder_integration-102}/pybuilder_integration.egg-info/zip-safe
RENAMED
|
File without changes
|
|
File without changes
|