pybuilder-integration 101__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.
Files changed (18) hide show
  1. {pybuilder-integration-101 → pybuilder_integration-102}/PKG-INFO +1 -1
  2. {pybuilder-integration-101 → pybuilder_integration-102}/pybuilder_integration/__init__.py +1 -0
  3. {pybuilder-integration-101 → pybuilder_integration-102}/pybuilder_integration/artifact_manager.py +11 -2
  4. {pybuilder-integration-101 → pybuilder_integration-102}/pybuilder_integration/properties.py +1 -0
  5. {pybuilder-integration-101 → pybuilder_integration-102}/pybuilder_integration.egg-info/PKG-INFO +1 -1
  6. {pybuilder-integration-101 → pybuilder_integration-102}/setup.py +1 -1
  7. {pybuilder-integration-101 → pybuilder_integration-102}/pybuilder_integration/cloudwatchlogs_utility.py +0 -0
  8. {pybuilder-integration-101 → pybuilder_integration-102}/pybuilder_integration/directory_utility.py +0 -0
  9. {pybuilder-integration-101 → pybuilder_integration-102}/pybuilder_integration/exec_utility.py +0 -0
  10. {pybuilder-integration-101 → pybuilder_integration-102}/pybuilder_integration/tasks.py +0 -0
  11. {pybuilder-integration-101 → pybuilder_integration-102}/pybuilder_integration/tool_utility.py +0 -0
  12. {pybuilder-integration-101 → pybuilder_integration-102}/pybuilder_integration.egg-info/SOURCES.txt +0 -0
  13. {pybuilder-integration-101 → pybuilder_integration-102}/pybuilder_integration.egg-info/dependency_links.txt +0 -0
  14. {pybuilder-integration-101 → pybuilder_integration-102}/pybuilder_integration.egg-info/namespace_packages.txt +0 -0
  15. {pybuilder-integration-101 → pybuilder_integration-102}/pybuilder_integration.egg-info/requires.txt +0 -0
  16. {pybuilder-integration-101 → pybuilder_integration-102}/pybuilder_integration.egg-info/top_level.txt +0 -0
  17. {pybuilder-integration-101 → pybuilder_integration-102}/pybuilder_integration.egg-info/zip-safe +0 -0
  18. {pybuilder-integration-101 → pybuilder_integration-102}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pybuilder-integration
3
- Version: 101
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:
@@ -27,6 +27,7 @@ def init_plugin(project):
27
27
  f"\t${INTEGRATION_TARGET_URL} - (required) Full URL target for tests\n"
28
28
  f"\t${INTEGRATION_PUBLIC_TARGET_URL} - (required) Full public URL target for tests\n"
29
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"
30
31
  f"\t${PROMOTE_ARTIFACT} - Promote integration tests to LATEST-${ENVIRONMENT} (default TRUE)\n"
31
32
  )
32
33
  def verify_environment(project: Project, logger: Logger, reactor: Reactor):
@@ -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
- if os.path.basename(file).find("tavern") >= 0:
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 os.path.basename(file).find("cypress") >= 0:
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:
@@ -17,3 +17,4 @@ APPLICATION = "application"
17
17
  APPLICATION_GROUP = "application_group"
18
18
  RUN_PARALLEL = "pytest_parallel"
19
19
  CONSOLIDATE_TESTS = "consolidate_tavern"
20
+ TESTING_SCOPE = "testing_scope"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pybuilder-integration
3
- Version: 101
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:
@@ -21,7 +21,7 @@ class install(_install):
21
21
  if __name__ == '__main__':
22
22
  setup(
23
23
  name = 'pybuilder-integration',
24
- version = '101',
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,