cumulusci-plus 5.0.0__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 cumulusci-plus might be problematic. Click here for more details.
- cumulusci/__about__.py +1 -0
- cumulusci/__init__.py +22 -0
- cumulusci/__main__.py +3 -0
- cumulusci/cli/__init__.py +0 -0
- cumulusci/cli/cci.py +244 -0
- cumulusci/cli/error.py +125 -0
- cumulusci/cli/flow.py +185 -0
- cumulusci/cli/logger.py +72 -0
- cumulusci/cli/org.py +692 -0
- cumulusci/cli/plan.py +181 -0
- cumulusci/cli/project.py +391 -0
- cumulusci/cli/robot.py +116 -0
- cumulusci/cli/runtime.py +190 -0
- cumulusci/cli/service.py +521 -0
- cumulusci/cli/task.py +295 -0
- cumulusci/cli/tests/__init__.py +0 -0
- cumulusci/cli/tests/test_cci.py +545 -0
- cumulusci/cli/tests/test_error.py +170 -0
- cumulusci/cli/tests/test_flow.py +276 -0
- cumulusci/cli/tests/test_logger.py +25 -0
- cumulusci/cli/tests/test_org.py +1438 -0
- cumulusci/cli/tests/test_plan.py +245 -0
- cumulusci/cli/tests/test_project.py +235 -0
- cumulusci/cli/tests/test_robot.py +177 -0
- cumulusci/cli/tests/test_runtime.py +197 -0
- cumulusci/cli/tests/test_service.py +853 -0
- cumulusci/cli/tests/test_task.py +266 -0
- cumulusci/cli/tests/test_ui.py +310 -0
- cumulusci/cli/tests/test_utils.py +122 -0
- cumulusci/cli/tests/utils.py +52 -0
- cumulusci/cli/ui.py +234 -0
- cumulusci/cli/utils.py +150 -0
- cumulusci/conftest.py +181 -0
- cumulusci/core/__init__.py +0 -0
- cumulusci/core/config/BaseConfig.py +5 -0
- cumulusci/core/config/BaseTaskFlowConfig.py +5 -0
- cumulusci/core/config/OrgConfig.py +5 -0
- cumulusci/core/config/ScratchOrgConfig.py +5 -0
- cumulusci/core/config/__init__.py +125 -0
- cumulusci/core/config/base_config.py +111 -0
- cumulusci/core/config/base_task_flow_config.py +82 -0
- cumulusci/core/config/marketing_cloud_service_config.py +83 -0
- cumulusci/core/config/oauth2_service_config.py +17 -0
- cumulusci/core/config/org_config.py +604 -0
- cumulusci/core/config/project_config.py +782 -0
- cumulusci/core/config/scratch_org_config.py +251 -0
- cumulusci/core/config/sfdx_org_config.py +220 -0
- cumulusci/core/config/tests/_test_config_backwards_compatibility.py +33 -0
- cumulusci/core/config/tests/test_config.py +1895 -0
- cumulusci/core/config/tests/test_config_expensive.py +839 -0
- cumulusci/core/config/tests/test_config_util.py +91 -0
- cumulusci/core/config/universal_config.py +88 -0
- cumulusci/core/config/util.py +18 -0
- cumulusci/core/datasets.py +303 -0
- cumulusci/core/debug.py +33 -0
- cumulusci/core/dependencies/__init__.py +55 -0
- cumulusci/core/dependencies/base.py +561 -0
- cumulusci/core/dependencies/dependencies.py +273 -0
- cumulusci/core/dependencies/github.py +177 -0
- cumulusci/core/dependencies/github_resolvers.py +244 -0
- cumulusci/core/dependencies/resolvers.py +580 -0
- cumulusci/core/dependencies/tests/__init__.py +0 -0
- cumulusci/core/dependencies/tests/conftest.py +385 -0
- cumulusci/core/dependencies/tests/test_dependencies.py +950 -0
- cumulusci/core/dependencies/tests/test_github.py +83 -0
- cumulusci/core/dependencies/tests/test_resolvers.py +1027 -0
- cumulusci/core/dependencies/utils.py +13 -0
- cumulusci/core/enums.py +11 -0
- cumulusci/core/exceptions.py +311 -0
- cumulusci/core/flowrunner.py +888 -0
- cumulusci/core/github.py +665 -0
- cumulusci/core/keychain/__init__.py +24 -0
- cumulusci/core/keychain/base_project_keychain.py +441 -0
- cumulusci/core/keychain/encrypted_file_project_keychain.py +945 -0
- cumulusci/core/keychain/environment_project_keychain.py +7 -0
- cumulusci/core/keychain/serialization.py +152 -0
- cumulusci/core/keychain/subprocess_keychain.py +24 -0
- cumulusci/core/keychain/tests/conftest.py +50 -0
- cumulusci/core/keychain/tests/test_base_project_keychain.py +299 -0
- cumulusci/core/keychain/tests/test_encrypted_file_project_keychain.py +1228 -0
- cumulusci/core/metadeploy/__init__.py +0 -0
- cumulusci/core/metadeploy/api.py +88 -0
- cumulusci/core/metadeploy/plans.py +25 -0
- cumulusci/core/metadeploy/tests/test_api.py +276 -0
- cumulusci/core/runtime.py +115 -0
- cumulusci/core/sfdx.py +162 -0
- cumulusci/core/source/__init__.py +16 -0
- cumulusci/core/source/github.py +50 -0
- cumulusci/core/source/local_folder.py +35 -0
- cumulusci/core/source_transforms/__init__.py +0 -0
- cumulusci/core/source_transforms/tests/test_transforms.py +1091 -0
- cumulusci/core/source_transforms/transforms.py +532 -0
- cumulusci/core/tasks.py +404 -0
- cumulusci/core/template_utils.py +59 -0
- cumulusci/core/tests/__init__.py +0 -0
- cumulusci/core/tests/cassettes/TestDatasetsE2E.test_datasets_e2e.yaml +215 -0
- cumulusci/core/tests/cassettes/TestDatasetsE2E.test_datasets_extract_standard_objects.yaml +199 -0
- cumulusci/core/tests/cassettes/TestDatasetsE2E.test_datasets_read_explicit_extract_declaration.yaml +3 -0
- cumulusci/core/tests/fake_remote_repo/cumulusci.yml +32 -0
- cumulusci/core/tests/fake_remote_repo/tasks/directory/example_2.py +6 -0
- cumulusci/core/tests/fake_remote_repo/tasks/example.py +43 -0
- cumulusci/core/tests/fake_remote_repo_2/cumulusci.yml +11 -0
- cumulusci/core/tests/fake_remote_repo_2/tasks/example_3.py +6 -0
- cumulusci/core/tests/test_datasets_e2e.py +386 -0
- cumulusci/core/tests/test_exceptions.py +11 -0
- cumulusci/core/tests/test_flowrunner.py +836 -0
- cumulusci/core/tests/test_github.py +942 -0
- cumulusci/core/tests/test_sfdx.py +138 -0
- cumulusci/core/tests/test_source.py +678 -0
- cumulusci/core/tests/test_tasks.py +262 -0
- cumulusci/core/tests/test_utils.py +141 -0
- cumulusci/core/tests/test_utils_merge_config.py +276 -0
- cumulusci/core/tests/test_versions.py +76 -0
- cumulusci/core/tests/untrusted_repo_child/cumulusci.yml +7 -0
- cumulusci/core/tests/untrusted_repo_child/tasks/untrusted_child.py +6 -0
- cumulusci/core/tests/untrusted_repo_parent/cumulusci.yml +26 -0
- cumulusci/core/tests/untrusted_repo_parent/tasks/untrusted_parent.py +6 -0
- cumulusci/core/tests/utils.py +116 -0
- cumulusci/core/tests/yaml/global.yaml +0 -0
- cumulusci/core/utils.py +402 -0
- cumulusci/core/versions.py +149 -0
- cumulusci/cumulusci.yml +1621 -0
- cumulusci/files/admin_profile.xml +20 -0
- cumulusci/files/delete_excludes.txt +424 -0
- cumulusci/files/templates/project/README.md +12 -0
- cumulusci/files/templates/project/cumulusci.yml +63 -0
- cumulusci/files/templates/project/dot-gitignore +60 -0
- cumulusci/files/templates/project/mapping.yml +45 -0
- cumulusci/files/templates/project/scratch_def.json +25 -0
- cumulusci/oauth/__init__.py +0 -0
- cumulusci/oauth/client.py +400 -0
- cumulusci/oauth/exceptions.py +9 -0
- cumulusci/oauth/salesforce.py +95 -0
- cumulusci/oauth/tests/__init__.py +0 -0
- cumulusci/oauth/tests/cassettes/test_get_device_code.yaml +22 -0
- cumulusci/oauth/tests/cassettes/test_get_device_oauth_token.yaml +74 -0
- cumulusci/oauth/tests/test_client.py +308 -0
- cumulusci/oauth/tests/test_salesforce.py +46 -0
- cumulusci/plugins/__init__.py +3 -0
- cumulusci/plugins/plugin_base.py +93 -0
- cumulusci/plugins/plugin_loader.py +59 -0
- cumulusci/robotframework/CumulusCI.py +340 -0
- cumulusci/robotframework/CumulusCI.robot +7 -0
- cumulusci/robotframework/Performance.py +165 -0
- cumulusci/robotframework/Salesforce.py +936 -0
- cumulusci/robotframework/Salesforce.robot +192 -0
- cumulusci/robotframework/SalesforceAPI.py +416 -0
- cumulusci/robotframework/SalesforcePlaywright.py +220 -0
- cumulusci/robotframework/SalesforcePlaywright.robot +40 -0
- cumulusci/robotframework/__init__.py +2 -0
- cumulusci/robotframework/base_library.py +39 -0
- cumulusci/robotframework/faker_mixin.py +89 -0
- cumulusci/robotframework/form_handlers.py +222 -0
- cumulusci/robotframework/javascript/cci_init.js +34 -0
- cumulusci/robotframework/javascript/cumulusci.js +4 -0
- cumulusci/robotframework/locator_manager.py +197 -0
- cumulusci/robotframework/locators_56.py +88 -0
- cumulusci/robotframework/locators_57.py +5 -0
- cumulusci/robotframework/pageobjects/BasePageObjects.py +433 -0
- cumulusci/robotframework/pageobjects/ObjectManagerPageObject.py +246 -0
- cumulusci/robotframework/pageobjects/PageObjectLibrary.py +45 -0
- cumulusci/robotframework/pageobjects/PageObjects.py +351 -0
- cumulusci/robotframework/pageobjects/__init__.py +12 -0
- cumulusci/robotframework/pageobjects/baseobjects.py +120 -0
- cumulusci/robotframework/perftests/short/collection_perf.robot +105 -0
- cumulusci/robotframework/tests/CustomObjectTestPage.py +10 -0
- cumulusci/robotframework/tests/FooTestPage.py +8 -0
- cumulusci/robotframework/tests/cumulusci/base.robot +40 -0
- cumulusci/robotframework/tests/cumulusci/bulkdata.robot +38 -0
- cumulusci/robotframework/tests/cumulusci/communities.robot +57 -0
- cumulusci/robotframework/tests/cumulusci/datagen.robot +84 -0
- cumulusci/robotframework/tests/salesforce/TestLibraryA.py +24 -0
- cumulusci/robotframework/tests/salesforce/TestLibraryB.py +20 -0
- cumulusci/robotframework/tests/salesforce/TestListener.py +93 -0
- cumulusci/robotframework/tests/salesforce/api.robot +178 -0
- cumulusci/robotframework/tests/salesforce/browsers.robot +143 -0
- cumulusci/robotframework/tests/salesforce/classic.robot +51 -0
- cumulusci/robotframework/tests/salesforce/create_contact.robot +59 -0
- cumulusci/robotframework/tests/salesforce/faker.robot +68 -0
- cumulusci/robotframework/tests/salesforce/forms.robot +172 -0
- cumulusci/robotframework/tests/salesforce/label_locator.robot +244 -0
- cumulusci/robotframework/tests/salesforce/labels.html +33 -0
- cumulusci/robotframework/tests/salesforce/locators.robot +149 -0
- cumulusci/robotframework/tests/salesforce/pageobjects/base_pageobjects.robot +100 -0
- cumulusci/robotframework/tests/salesforce/pageobjects/example_page_object.py +25 -0
- cumulusci/robotframework/tests/salesforce/pageobjects/listing_page.robot +115 -0
- cumulusci/robotframework/tests/salesforce/pageobjects/objectmanager.robot +74 -0
- cumulusci/robotframework/tests/salesforce/pageobjects/pageobjects.robot +171 -0
- cumulusci/robotframework/tests/salesforce/performance.robot +109 -0
- cumulusci/robotframework/tests/salesforce/playwright/javascript_keywords.robot +33 -0
- cumulusci/robotframework/tests/salesforce/playwright/open_test_browser.robot +48 -0
- cumulusci/robotframework/tests/salesforce/playwright/playwright.robot +24 -0
- cumulusci/robotframework/tests/salesforce/playwright/ui.robot +32 -0
- cumulusci/robotframework/tests/salesforce/populate.robot +89 -0
- cumulusci/robotframework/tests/salesforce/test_testlistener.py +37 -0
- cumulusci/robotframework/tests/salesforce/ui.robot +361 -0
- cumulusci/robotframework/tests/test_cumulusci_library.py +304 -0
- cumulusci/robotframework/tests/test_locator_manager.py +158 -0
- cumulusci/robotframework/tests/test_pageobjects.py +291 -0
- cumulusci/robotframework/tests/test_performance.py +38 -0
- cumulusci/robotframework/tests/test_salesforce.py +79 -0
- cumulusci/robotframework/tests/test_salesforce_locators.py +73 -0
- cumulusci/robotframework/tests/test_template_util.py +53 -0
- cumulusci/robotframework/tests/test_utils.py +106 -0
- cumulusci/robotframework/utils.py +283 -0
- cumulusci/salesforce_api/__init__.py +0 -0
- cumulusci/salesforce_api/exceptions.py +23 -0
- cumulusci/salesforce_api/filterable_objects.py +96 -0
- cumulusci/salesforce_api/mc_soap_envelopes.py +89 -0
- cumulusci/salesforce_api/metadata.py +721 -0
- cumulusci/salesforce_api/org_schema.py +571 -0
- cumulusci/salesforce_api/org_schema_models.py +226 -0
- cumulusci/salesforce_api/package_install.py +265 -0
- cumulusci/salesforce_api/package_zip.py +301 -0
- cumulusci/salesforce_api/rest_deploy.py +148 -0
- cumulusci/salesforce_api/retrieve_profile_api.py +301 -0
- cumulusci/salesforce_api/soap_envelopes.py +177 -0
- cumulusci/salesforce_api/tests/__init__.py +0 -0
- cumulusci/salesforce_api/tests/metadata_test_strings.py +24 -0
- cumulusci/salesforce_api/tests/test_metadata.py +1015 -0
- cumulusci/salesforce_api/tests/test_package_install.py +219 -0
- cumulusci/salesforce_api/tests/test_package_zip.py +380 -0
- cumulusci/salesforce_api/tests/test_rest_deploy.py +264 -0
- cumulusci/salesforce_api/tests/test_retrieve_profile_api.py +337 -0
- cumulusci/salesforce_api/tests/test_utils.py +124 -0
- cumulusci/salesforce_api/utils.py +51 -0
- cumulusci/schema/cumulusci.jsonschema.json +782 -0
- cumulusci/tasks/__init__.py +0 -0
- cumulusci/tasks/apex/__init__.py +0 -0
- cumulusci/tasks/apex/anon.py +157 -0
- cumulusci/tasks/apex/batch.py +180 -0
- cumulusci/tasks/apex/testrunner.py +835 -0
- cumulusci/tasks/apex/tests/cassettes/ManualEditTestApexIntegrationTests.test_run_tests__integration_test.yaml +703 -0
- cumulusci/tasks/apex/tests/test_apex_tasks.py +1558 -0
- cumulusci/tasks/base_source_control_task.py +17 -0
- cumulusci/tasks/bulkdata/__init__.py +15 -0
- cumulusci/tasks/bulkdata/base_generate_data_task.py +96 -0
- cumulusci/tasks/bulkdata/dates.py +97 -0
- cumulusci/tasks/bulkdata/delete.py +156 -0
- cumulusci/tasks/bulkdata/extract.py +441 -0
- cumulusci/tasks/bulkdata/extract_dataset_utils/calculate_dependencies.py +117 -0
- cumulusci/tasks/bulkdata/extract_dataset_utils/extract_yml.py +123 -0
- cumulusci/tasks/bulkdata/extract_dataset_utils/hardcoded_default_declarations.py +49 -0
- cumulusci/tasks/bulkdata/extract_dataset_utils/synthesize_extract_declarations.py +283 -0
- cumulusci/tasks/bulkdata/extract_dataset_utils/tests/test_extract_yml.py +142 -0
- cumulusci/tasks/bulkdata/extract_dataset_utils/tests/test_synthesize_extract_declarations.py +575 -0
- cumulusci/tasks/bulkdata/factory_utils.py +134 -0
- cumulusci/tasks/bulkdata/generate.py +4 -0
- cumulusci/tasks/bulkdata/generate_and_load_data.py +232 -0
- cumulusci/tasks/bulkdata/generate_and_load_data_from_yaml.py +19 -0
- cumulusci/tasks/bulkdata/generate_from_yaml.py +183 -0
- cumulusci/tasks/bulkdata/generate_mapping.py +434 -0
- cumulusci/tasks/bulkdata/generate_mapping_utils/dependency_map.py +169 -0
- cumulusci/tasks/bulkdata/generate_mapping_utils/extract_mapping_file_generator.py +45 -0
- cumulusci/tasks/bulkdata/generate_mapping_utils/generate_mapping_from_declarations.py +121 -0
- cumulusci/tasks/bulkdata/generate_mapping_utils/load_mapping_file_generator.py +127 -0
- cumulusci/tasks/bulkdata/generate_mapping_utils/mapping_generator_post_processes.py +53 -0
- cumulusci/tasks/bulkdata/generate_mapping_utils/mapping_transforms.py +139 -0
- cumulusci/tasks/bulkdata/generate_mapping_utils/tests/test_generate_extract_mapping_from_declarations.py +135 -0
- cumulusci/tasks/bulkdata/generate_mapping_utils/tests/test_generate_load_mapping_from_declarations.py +330 -0
- cumulusci/tasks/bulkdata/generate_mapping_utils/tests/test_mapping_generator_post_processes.py +60 -0
- cumulusci/tasks/bulkdata/generate_mapping_utils/tests/test_mapping_transforms.py +188 -0
- cumulusci/tasks/bulkdata/load.py +1196 -0
- cumulusci/tasks/bulkdata/mapping_parser.py +811 -0
- cumulusci/tasks/bulkdata/query_transformers.py +264 -0
- cumulusci/tasks/bulkdata/select_utils.py +792 -0
- cumulusci/tasks/bulkdata/snowfakery.py +753 -0
- cumulusci/tasks/bulkdata/snowfakery_utils/queue_manager.py +478 -0
- cumulusci/tasks/bulkdata/snowfakery_utils/snowfakery_run_until.py +141 -0
- cumulusci/tasks/bulkdata/snowfakery_utils/snowfakery_working_directory.py +53 -0
- cumulusci/tasks/bulkdata/snowfakery_utils/subtask_configurator.py +64 -0
- cumulusci/tasks/bulkdata/step.py +1242 -0
- cumulusci/tasks/bulkdata/tests/__init__.py +0 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestSelect.test_select_random_strategy.yaml +147 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestSelect.test_select_similarity_annoy_strategy.yaml +123 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestSelect.test_select_similarity_select_and_insert_strategy.yaml +313 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestSelect.test_select_similarity_select_and_insert_strategy_bulk.yaml +550 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestSelect.test_select_similarity_strategy.yaml +175 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestSelect.test_select_standard_strategy.yaml +147 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestSnowfakery.test_run_until_records_in_org__multiple_needed.yaml +69 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestSnowfakery.test_run_until_records_in_org__none_needed.yaml +22 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestSnowfakery.test_run_until_records_in_org__one_needed.yaml +24 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestSnowfakery.test_snowfakery_query_salesforce.yaml +25 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestUpdatesIntegrationTests.test_updates_task.yaml +80 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestUpsert.test_simple_upsert__rest.yaml +270 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestUpsert.test_upsert__rest.yaml +267 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestUpsert.test_upsert_complex_external_id_field__rest.yaml +369 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestUpsert.test_upsert_complex_external_id_field_rest__duplicate_error.yaml +204 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestUpsert.test_upsert_complex_fields__bulk.yaml +675 -0
- cumulusci/tasks/bulkdata/tests/dummy_data_factory.py +36 -0
- cumulusci/tasks/bulkdata/tests/integration_test_utils.py +49 -0
- cumulusci/tasks/bulkdata/tests/mapping-oid.yml +87 -0
- cumulusci/tasks/bulkdata/tests/mapping_after.yml +38 -0
- cumulusci/tasks/bulkdata/tests/mapping_poly.yml +34 -0
- cumulusci/tasks/bulkdata/tests/mapping_poly_incomplete.yml +20 -0
- cumulusci/tasks/bulkdata/tests/mapping_poly_wrong.yml +21 -0
- cumulusci/tasks/bulkdata/tests/mapping_select.yml +20 -0
- cumulusci/tasks/bulkdata/tests/mapping_select_invalid_strategy.yml +20 -0
- cumulusci/tasks/bulkdata/tests/mapping_select_invalid_threshold__invalid_number.yml +21 -0
- cumulusci/tasks/bulkdata/tests/mapping_select_invalid_threshold__invalid_strategy.yml +21 -0
- cumulusci/tasks/bulkdata/tests/mapping_select_invalid_threshold__non_float.yml +21 -0
- cumulusci/tasks/bulkdata/tests/mapping_select_missing_priority_fields.yml +22 -0
- cumulusci/tasks/bulkdata/tests/mapping_select_no_priority_fields.yml +18 -0
- cumulusci/tasks/bulkdata/tests/mapping_simple.yml +27 -0
- cumulusci/tasks/bulkdata/tests/mapping_v1.yml +28 -0
- cumulusci/tasks/bulkdata/tests/mapping_v2.yml +21 -0
- cumulusci/tasks/bulkdata/tests/mapping_v3.yml +32 -0
- cumulusci/tasks/bulkdata/tests/mapping_vanilla_sf.yml +69 -0
- cumulusci/tasks/bulkdata/tests/mock_data_factory_without_mapping.py +12 -0
- cumulusci/tasks/bulkdata/tests/person_accounts.yml +23 -0
- cumulusci/tasks/bulkdata/tests/person_accounts_minimal.yml +15 -0
- cumulusci/tasks/bulkdata/tests/recordtypes.yml +8 -0
- cumulusci/tasks/bulkdata/tests/recordtypes_2.yml +6 -0
- cumulusci/tasks/bulkdata/tests/recordtypes_with_ispersontype.yml +8 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/child/child2.yml +3 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/child.yml +4 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/gen_npsp_standard_objects.recipe.yml +89 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/include_parent.yml +3 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/npsp_standard_objects_macros.yml +34 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/options.recipe.yml +6 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/query_snowfakery.recipe.yml +16 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/sf_standard_object_macros.yml +83 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/simple_snowfakery.load.yml +2 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/simple_snowfakery.recipe.yml +13 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/simple_snowfakery_2.load.yml +5 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/simple_snowfakery_channels.load.yml +13 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/simple_snowfakery_channels.recipe.yml +12 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/simple_snowfakery_channels_2.load.yml +13 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/unique_values.recipe.yml +4 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/upsert.recipe.yml +23 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/upsert_2.recipe.yml +29 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/upsert_before.yml +10 -0
- cumulusci/tasks/bulkdata/tests/test_base_generate_data_tasks.py +61 -0
- cumulusci/tasks/bulkdata/tests/test_dates.py +99 -0
- cumulusci/tasks/bulkdata/tests/test_delete.py +404 -0
- cumulusci/tasks/bulkdata/tests/test_extract.py +1311 -0
- cumulusci/tasks/bulkdata/tests/test_factory_utils.py +55 -0
- cumulusci/tasks/bulkdata/tests/test_generate_and_load.py +252 -0
- cumulusci/tasks/bulkdata/tests/test_generate_from_snowfakery_task.py +343 -0
- cumulusci/tasks/bulkdata/tests/test_generatemapping.py +1039 -0
- cumulusci/tasks/bulkdata/tests/test_load.py +3175 -0
- cumulusci/tasks/bulkdata/tests/test_mapping_parser.py +1658 -0
- cumulusci/tasks/bulkdata/tests/test_query_db__joins_self_lookups.yml +12 -0
- cumulusci/tasks/bulkdata/tests/test_query_db_joins_lookups.yml +26 -0
- cumulusci/tasks/bulkdata/tests/test_query_db_joins_lookups_select.yml +48 -0
- cumulusci/tasks/bulkdata/tests/test_select.py +171 -0
- cumulusci/tasks/bulkdata/tests/test_select_utils.py +1057 -0
- cumulusci/tasks/bulkdata/tests/test_snowfakery.py +1153 -0
- cumulusci/tasks/bulkdata/tests/test_step.py +3957 -0
- cumulusci/tasks/bulkdata/tests/test_updates.py +513 -0
- cumulusci/tasks/bulkdata/tests/test_upsert.py +1015 -0
- cumulusci/tasks/bulkdata/tests/test_utils.py +158 -0
- cumulusci/tasks/bulkdata/tests/testdata.db +0 -0
- cumulusci/tasks/bulkdata/tests/update_describe.py +50 -0
- cumulusci/tasks/bulkdata/tests/update_person_accounts.yml +23 -0
- cumulusci/tasks/bulkdata/tests/utils.py +114 -0
- cumulusci/tasks/bulkdata/update_data.py +260 -0
- cumulusci/tasks/bulkdata/upsert_utils.py +130 -0
- cumulusci/tasks/bulkdata/utils.py +249 -0
- cumulusci/tasks/command.py +178 -0
- cumulusci/tasks/connectedapp.py +186 -0
- cumulusci/tasks/create_package_version.py +778 -0
- cumulusci/tasks/datadictionary.py +745 -0
- cumulusci/tasks/dx_convert_from.py +26 -0
- cumulusci/tasks/github/__init__.py +17 -0
- cumulusci/tasks/github/base.py +16 -0
- cumulusci/tasks/github/commit_status.py +13 -0
- cumulusci/tasks/github/merge.py +11 -0
- cumulusci/tasks/github/publish.py +11 -0
- cumulusci/tasks/github/pull_request.py +11 -0
- cumulusci/tasks/github/release.py +11 -0
- cumulusci/tasks/github/release_report.py +11 -0
- cumulusci/tasks/github/tag.py +11 -0
- cumulusci/tasks/github/tests/__init__.py +0 -0
- cumulusci/tasks/github/tests/test_util.py +202 -0
- cumulusci/tasks/github/tests/test_vcs_migration.py +44 -0
- cumulusci/tasks/github/tests/util_github_api.py +666 -0
- cumulusci/tasks/github/util.py +252 -0
- cumulusci/tasks/marketing_cloud/__init__.py +0 -0
- cumulusci/tasks/marketing_cloud/api.py +188 -0
- cumulusci/tasks/marketing_cloud/base.py +38 -0
- cumulusci/tasks/marketing_cloud/deploy.py +345 -0
- cumulusci/tasks/marketing_cloud/get_user_info.py +40 -0
- cumulusci/tasks/marketing_cloud/mc_constants.py +1 -0
- cumulusci/tasks/marketing_cloud/tests/__init__.py +0 -0
- cumulusci/tasks/marketing_cloud/tests/conftest.py +46 -0
- cumulusci/tasks/marketing_cloud/tests/expected-payload.json +110 -0
- cumulusci/tasks/marketing_cloud/tests/test_api.py +97 -0
- cumulusci/tasks/marketing_cloud/tests/test_api_soap_envelopes.py +145 -0
- cumulusci/tasks/marketing_cloud/tests/test_base.py +14 -0
- cumulusci/tasks/marketing_cloud/tests/test_deploy.py +400 -0
- cumulusci/tasks/marketing_cloud/tests/test_get_user_info.py +141 -0
- cumulusci/tasks/marketing_cloud/tests/validation-response.json +39 -0
- cumulusci/tasks/metadata/__init__.py +0 -0
- cumulusci/tasks/metadata/ee_src.py +94 -0
- cumulusci/tasks/metadata/managed_src.py +100 -0
- cumulusci/tasks/metadata/metadata_map.yml +868 -0
- cumulusci/tasks/metadata/modify.py +99 -0
- cumulusci/tasks/metadata/package.py +684 -0
- cumulusci/tasks/metadata/tests/__init__.py +0 -0
- cumulusci/tasks/metadata/tests/package_metadata/namespaced_report_folder/.hidden/.keep +0 -0
- cumulusci/tasks/metadata/tests/package_metadata/namespaced_report_folder/destructiveChanges.xml +9 -0
- cumulusci/tasks/metadata/tests/package_metadata/namespaced_report_folder/package.xml +9 -0
- cumulusci/tasks/metadata/tests/package_metadata/namespaced_report_folder/package_install_uninstall.xml +11 -0
- cumulusci/tasks/metadata/tests/package_metadata/namespaced_report_folder/reports/namespace__TestFolder/TestReport.report +3 -0
- cumulusci/tasks/metadata/tests/sample_package.xml +9 -0
- cumulusci/tasks/metadata/tests/test_ee_src.py +112 -0
- cumulusci/tasks/metadata/tests/test_managed_src.py +111 -0
- cumulusci/tasks/metadata/tests/test_modify.py +123 -0
- cumulusci/tasks/metadata/tests/test_package.py +476 -0
- cumulusci/tasks/metadata_etl/__init__.py +29 -0
- cumulusci/tasks/metadata_etl/base.py +436 -0
- cumulusci/tasks/metadata_etl/duplicate_rules.py +24 -0
- cumulusci/tasks/metadata_etl/field_sets.py +70 -0
- cumulusci/tasks/metadata_etl/help_text.py +92 -0
- cumulusci/tasks/metadata_etl/layouts.py +550 -0
- cumulusci/tasks/metadata_etl/objects.py +68 -0
- cumulusci/tasks/metadata_etl/permissions.py +167 -0
- cumulusci/tasks/metadata_etl/picklists.py +221 -0
- cumulusci/tasks/metadata_etl/remote_site_settings.py +99 -0
- cumulusci/tasks/metadata_etl/sharing.py +138 -0
- cumulusci/tasks/metadata_etl/tests/test_base.py +512 -0
- cumulusci/tasks/metadata_etl/tests/test_duplicate_rules.py +22 -0
- cumulusci/tasks/metadata_etl/tests/test_field_sets.py +156 -0
- cumulusci/tasks/metadata_etl/tests/test_help_text.py +387 -0
- cumulusci/tasks/metadata_etl/tests/test_ip_ranges.py +85 -0
- cumulusci/tasks/metadata_etl/tests/test_layouts.py +858 -0
- cumulusci/tasks/metadata_etl/tests/test_objects.py +236 -0
- cumulusci/tasks/metadata_etl/tests/test_permissions.py +223 -0
- cumulusci/tasks/metadata_etl/tests/test_picklists.py +547 -0
- cumulusci/tasks/metadata_etl/tests/test_remote_site_settings.py +46 -0
- cumulusci/tasks/metadata_etl/tests/test_sharing.py +333 -0
- cumulusci/tasks/metadata_etl/tests/test_value_sets.py +298 -0
- cumulusci/tasks/metadata_etl/value_sets.py +106 -0
- cumulusci/tasks/metadeploy.py +393 -0
- cumulusci/tasks/metaxml.py +88 -0
- cumulusci/tasks/preflight/__init__.py +0 -0
- cumulusci/tasks/preflight/dataset_load.py +49 -0
- cumulusci/tasks/preflight/licenses.py +86 -0
- cumulusci/tasks/preflight/packages.py +14 -0
- cumulusci/tasks/preflight/permsets.py +23 -0
- cumulusci/tasks/preflight/recordtypes.py +16 -0
- cumulusci/tasks/preflight/retrieve_tasks.py +30 -0
- cumulusci/tasks/preflight/settings.py +77 -0
- cumulusci/tasks/preflight/sobjects.py +202 -0
- cumulusci/tasks/preflight/tests/test_dataset_load.py +85 -0
- cumulusci/tasks/preflight/tests/test_licenses.py +174 -0
- cumulusci/tasks/preflight/tests/test_packages.py +14 -0
- cumulusci/tasks/preflight/tests/test_permset_preflights.py +51 -0
- cumulusci/tasks/preflight/tests/test_recordtypes.py +30 -0
- cumulusci/tasks/preflight/tests/test_retrieve_tasks.py +62 -0
- cumulusci/tasks/preflight/tests/test_settings.py +130 -0
- cumulusci/tasks/preflight/tests/test_sobjects.py +231 -0
- cumulusci/tasks/push/README.md +59 -0
- cumulusci/tasks/push/__init__.py +0 -0
- cumulusci/tasks/push/push_api.py +659 -0
- cumulusci/tasks/push/pushfails.py +136 -0
- cumulusci/tasks/push/tasks.py +476 -0
- cumulusci/tasks/push/tests/conftest.py +263 -0
- cumulusci/tasks/push/tests/test_push_api.py +951 -0
- cumulusci/tasks/push/tests/test_push_tasks.py +659 -0
- cumulusci/tasks/release_notes/README.md +63 -0
- cumulusci/tasks/release_notes/__init__.py +0 -0
- cumulusci/tasks/release_notes/exceptions.py +5 -0
- cumulusci/tasks/release_notes/generator.py +137 -0
- cumulusci/tasks/release_notes/parser.py +232 -0
- cumulusci/tasks/release_notes/provider.py +44 -0
- cumulusci/tasks/release_notes/task.py +300 -0
- cumulusci/tasks/release_notes/tests/__init__.py +0 -0
- cumulusci/tasks/release_notes/tests/change_notes/full/example1.md +17 -0
- cumulusci/tasks/release_notes/tests/change_notes/multi/1.txt +1 -0
- cumulusci/tasks/release_notes/tests/change_notes/multi/2.txt +1 -0
- cumulusci/tasks/release_notes/tests/change_notes/multi/3.txt +1 -0
- cumulusci/tasks/release_notes/tests/change_notes/single/1.txt +1 -0
- cumulusci/tasks/release_notes/tests/test_generator.py +582 -0
- cumulusci/tasks/release_notes/tests/test_parser.py +867 -0
- cumulusci/tasks/release_notes/tests/test_provider.py +512 -0
- cumulusci/tasks/release_notes/tests/test_task.py +461 -0
- cumulusci/tasks/release_notes/tests/utils.py +153 -0
- cumulusci/tasks/robotframework/__init__.py +3 -0
- cumulusci/tasks/robotframework/debugger/DebugListener.py +100 -0
- cumulusci/tasks/robotframework/debugger/__init__.py +10 -0
- cumulusci/tasks/robotframework/debugger/model.py +87 -0
- cumulusci/tasks/robotframework/debugger/ui.py +259 -0
- cumulusci/tasks/robotframework/libdoc.py +269 -0
- cumulusci/tasks/robotframework/robotframework.py +392 -0
- cumulusci/tasks/robotframework/stylesheet.css +130 -0
- cumulusci/tasks/robotframework/template.html +109 -0
- cumulusci/tasks/robotframework/tests/TestLibrary.py +18 -0
- cumulusci/tasks/robotframework/tests/TestPageObjects.py +31 -0
- cumulusci/tasks/robotframework/tests/TestResource.robot +8 -0
- cumulusci/tasks/robotframework/tests/failing_tests.robot +16 -0
- cumulusci/tasks/robotframework/tests/performance.robot +23 -0
- cumulusci/tasks/robotframework/tests/test_browser_proxies.py +137 -0
- cumulusci/tasks/robotframework/tests/test_debugger.py +360 -0
- cumulusci/tasks/robotframework/tests/test_robot_parallel.py +141 -0
- cumulusci/tasks/robotframework/tests/test_robotframework.py +860 -0
- cumulusci/tasks/salesforce/BaseRetrieveMetadata.py +58 -0
- cumulusci/tasks/salesforce/BaseSalesforceApiTask.py +45 -0
- cumulusci/tasks/salesforce/BaseSalesforceMetadataApiTask.py +18 -0
- cumulusci/tasks/salesforce/BaseSalesforceTask.py +4 -0
- cumulusci/tasks/salesforce/BaseUninstallMetadata.py +41 -0
- cumulusci/tasks/salesforce/CreateCommunity.py +124 -0
- cumulusci/tasks/salesforce/CreatePackage.py +29 -0
- cumulusci/tasks/salesforce/Deploy.py +240 -0
- cumulusci/tasks/salesforce/DeployBundles.py +88 -0
- cumulusci/tasks/salesforce/DescribeMetadataTypes.py +26 -0
- cumulusci/tasks/salesforce/EnsureRecordTypes.py +202 -0
- cumulusci/tasks/salesforce/GetInstalledPackages.py +8 -0
- cumulusci/tasks/salesforce/ListCommunities.py +40 -0
- cumulusci/tasks/salesforce/ListCommunityTemplates.py +19 -0
- cumulusci/tasks/salesforce/PublishCommunity.py +62 -0
- cumulusci/tasks/salesforce/RetrievePackaged.py +41 -0
- cumulusci/tasks/salesforce/RetrieveReportsAndDashboards.py +82 -0
- cumulusci/tasks/salesforce/RetrieveUnpackaged.py +36 -0
- cumulusci/tasks/salesforce/SOQLQuery.py +39 -0
- cumulusci/tasks/salesforce/UninstallLocal.py +15 -0
- cumulusci/tasks/salesforce/UninstallLocalBundles.py +28 -0
- cumulusci/tasks/salesforce/UninstallLocalNamespacedBundles.py +58 -0
- cumulusci/tasks/salesforce/UninstallPackage.py +32 -0
- cumulusci/tasks/salesforce/UninstallPackaged.py +56 -0
- cumulusci/tasks/salesforce/UpdateAdminProfile.py +8 -0
- cumulusci/tasks/salesforce/__init__.py +79 -0
- cumulusci/tasks/salesforce/activate_flow.py +74 -0
- cumulusci/tasks/salesforce/check_components.py +324 -0
- cumulusci/tasks/salesforce/composite.py +142 -0
- cumulusci/tasks/salesforce/create_permission_sets.py +35 -0
- cumulusci/tasks/salesforce/custom_settings.py +134 -0
- cumulusci/tasks/salesforce/custom_settings_wait.py +132 -0
- cumulusci/tasks/salesforce/enable_prediction.py +107 -0
- cumulusci/tasks/salesforce/insert_record.py +40 -0
- cumulusci/tasks/salesforce/install_package_version.py +242 -0
- cumulusci/tasks/salesforce/license_preflights.py +8 -0
- cumulusci/tasks/salesforce/network_member_group.py +178 -0
- cumulusci/tasks/salesforce/nonsourcetracking.py +228 -0
- cumulusci/tasks/salesforce/org_settings.py +193 -0
- cumulusci/tasks/salesforce/package_upload.py +328 -0
- cumulusci/tasks/salesforce/profiles.py +74 -0
- cumulusci/tasks/salesforce/promote_package_version.py +376 -0
- cumulusci/tasks/salesforce/retrieve_profile.py +195 -0
- cumulusci/tasks/salesforce/salesforce_files.py +244 -0
- cumulusci/tasks/salesforce/sourcetracking.py +507 -0
- cumulusci/tasks/salesforce/tests/__init__.py +3 -0
- cumulusci/tasks/salesforce/tests/test_CreateCommunity.py +278 -0
- cumulusci/tasks/salesforce/tests/test_CreatePackage.py +22 -0
- cumulusci/tasks/salesforce/tests/test_Deploy.py +470 -0
- cumulusci/tasks/salesforce/tests/test_DeployBundles.py +76 -0
- cumulusci/tasks/salesforce/tests/test_EnsureRecordTypes.py +345 -0
- cumulusci/tasks/salesforce/tests/test_ListCommunities.py +84 -0
- cumulusci/tasks/salesforce/tests/test_ListCommunityTemplates.py +49 -0
- cumulusci/tasks/salesforce/tests/test_PackageUpload.py +547 -0
- cumulusci/tasks/salesforce/tests/test_ProfileGrantAllAccess.py +699 -0
- cumulusci/tasks/salesforce/tests/test_PublishCommunity.py +181 -0
- cumulusci/tasks/salesforce/tests/test_RetrievePackaged.py +24 -0
- cumulusci/tasks/salesforce/tests/test_RetrieveReportsAndDashboards.py +56 -0
- cumulusci/tasks/salesforce/tests/test_RetrieveUnpackaged.py +21 -0
- cumulusci/tasks/salesforce/tests/test_SOQLQuery.py +30 -0
- cumulusci/tasks/salesforce/tests/test_UninstallLocal.py +15 -0
- cumulusci/tasks/salesforce/tests/test_UninstallLocalBundles.py +19 -0
- cumulusci/tasks/salesforce/tests/test_UninstallLocalNamespacedBundles.py +22 -0
- cumulusci/tasks/salesforce/tests/test_UninstallPackage.py +19 -0
- cumulusci/tasks/salesforce/tests/test_UninstallPackaged.py +66 -0
- cumulusci/tasks/salesforce/tests/test_UninstallPackagedIncremental.py +127 -0
- cumulusci/tasks/salesforce/tests/test_activate_flow.py +132 -0
- cumulusci/tasks/salesforce/tests/test_base_tasks.py +110 -0
- cumulusci/tasks/salesforce/tests/test_check_components.py +445 -0
- cumulusci/tasks/salesforce/tests/test_composite.py +250 -0
- cumulusci/tasks/salesforce/tests/test_create_permission_sets.py +41 -0
- cumulusci/tasks/salesforce/tests/test_custom_settings.py +227 -0
- cumulusci/tasks/salesforce/tests/test_custom_settings_wait.py +174 -0
- cumulusci/tasks/salesforce/tests/test_describemetadatatypes.py +18 -0
- cumulusci/tasks/salesforce/tests/test_enable_prediction.py +240 -0
- cumulusci/tasks/salesforce/tests/test_insert_record.py +110 -0
- cumulusci/tasks/salesforce/tests/test_install_package_version.py +464 -0
- cumulusci/tasks/salesforce/tests/test_network_member_group.py +444 -0
- cumulusci/tasks/salesforce/tests/test_nonsourcetracking.py +235 -0
- cumulusci/tasks/salesforce/tests/test_org_settings.py +407 -0
- cumulusci/tasks/salesforce/tests/test_profiles.py +202 -0
- cumulusci/tasks/salesforce/tests/test_retrieve_profile.py +287 -0
- cumulusci/tasks/salesforce/tests/test_salesforce_files.py +228 -0
- cumulusci/tasks/salesforce/tests/test_sourcetracking.py +350 -0
- cumulusci/tasks/salesforce/tests/test_trigger_handlers.py +300 -0
- cumulusci/tasks/salesforce/tests/test_update_dependencies.py +509 -0
- cumulusci/tasks/salesforce/tests/util.py +79 -0
- cumulusci/tasks/salesforce/trigger_handlers.py +119 -0
- cumulusci/tasks/salesforce/uninstall_packaged_incremental.py +136 -0
- cumulusci/tasks/salesforce/update_dependencies.py +290 -0
- cumulusci/tasks/salesforce/update_profile.py +339 -0
- cumulusci/tasks/salesforce/users/permsets.py +227 -0
- cumulusci/tasks/salesforce/users/photos.py +162 -0
- cumulusci/tasks/salesforce/users/tests/photo.mock.txt +1 -0
- cumulusci/tasks/salesforce/users/tests/test_permsets.py +950 -0
- cumulusci/tasks/salesforce/users/tests/test_photos.py +373 -0
- cumulusci/tasks/sample_data/capture_sample_data.py +77 -0
- cumulusci/tasks/sample_data/load_sample_data.py +85 -0
- cumulusci/tasks/sample_data/test_capture_sample_data.py +117 -0
- cumulusci/tasks/sample_data/test_load_sample_data.py +121 -0
- cumulusci/tasks/sfdx.py +83 -0
- cumulusci/tasks/tests/__init__.py +1 -0
- cumulusci/tasks/tests/conftest.py +30 -0
- cumulusci/tasks/tests/test_command.py +129 -0
- cumulusci/tasks/tests/test_connectedapp.py +236 -0
- cumulusci/tasks/tests/test_create_package_version.py +847 -0
- cumulusci/tasks/tests/test_datadictionary.py +1575 -0
- cumulusci/tasks/tests/test_dx_convert_from.py +60 -0
- cumulusci/tasks/tests/test_metadeploy.py +624 -0
- cumulusci/tasks/tests/test_metaxml.py +99 -0
- cumulusci/tasks/tests/test_promote_package_version.py +488 -0
- cumulusci/tasks/tests/test_pushfails.py +96 -0
- cumulusci/tasks/tests/test_salesforce.py +72 -0
- cumulusci/tasks/tests/test_sfdx.py +105 -0
- cumulusci/tasks/tests/test_util.py +207 -0
- cumulusci/tasks/util.py +261 -0
- cumulusci/tasks/vcs/__init__.py +19 -0
- cumulusci/tasks/vcs/commit_status.py +58 -0
- cumulusci/tasks/vcs/create_commit_status.py +37 -0
- cumulusci/tasks/vcs/download_extract.py +199 -0
- cumulusci/tasks/vcs/merge.py +298 -0
- cumulusci/tasks/vcs/publish.py +207 -0
- cumulusci/tasks/vcs/pull_request.py +9 -0
- cumulusci/tasks/vcs/release.py +134 -0
- cumulusci/tasks/vcs/release_report.py +105 -0
- cumulusci/tasks/vcs/tag.py +31 -0
- cumulusci/tasks/vcs/tests/github/test_commit_status.py +196 -0
- cumulusci/tasks/vcs/tests/github/test_download_extract.py +896 -0
- cumulusci/tasks/vcs/tests/github/test_merge.py +1118 -0
- cumulusci/tasks/vcs/tests/github/test_publish.py +823 -0
- cumulusci/tasks/vcs/tests/github/test_pull_request.py +29 -0
- cumulusci/tasks/vcs/tests/github/test_release.py +390 -0
- cumulusci/tasks/vcs/tests/github/test_release_report.py +109 -0
- cumulusci/tasks/vcs/tests/github/test_tag.py +90 -0
- cumulusci/tasks/vlocity/exceptions.py +2 -0
- cumulusci/tasks/vlocity/tests/test_vlocity.py +283 -0
- cumulusci/tasks/vlocity/vlocity.py +342 -0
- cumulusci/tests/__init__.py +1 -0
- cumulusci/tests/cassettes/GET_sobjects_Account_PersonAccount_describe.yaml +18 -0
- cumulusci/tests/cassettes/TestIntegrationInfrastructure.test_integration_tests.yaml +19 -0
- cumulusci/tests/pytest_plugins/pytest_sf_orgconnect.py +307 -0
- cumulusci/tests/pytest_plugins/pytest_sf_vcr.py +275 -0
- cumulusci/tests/pytest_plugins/pytest_sf_vcr_serializer.py +160 -0
- cumulusci/tests/pytest_plugins/pytest_typeguard.py +5 -0
- cumulusci/tests/pytest_plugins/test_vcr_string_compressor.py +49 -0
- cumulusci/tests/pytest_plugins/vcr_string_compressor.py +97 -0
- cumulusci/tests/shared_cassettes/GET_sobjects_Account_describe.yaml +18 -0
- cumulusci/tests/shared_cassettes/GET_sobjects_Case_describe.yaml +18 -0
- cumulusci/tests/shared_cassettes/GET_sobjects_Contact_describe.yaml +4838 -0
- cumulusci/tests/shared_cassettes/GET_sobjects_Custom__c_describe.yaml +242 -0
- cumulusci/tests/shared_cassettes/GET_sobjects_Event_describe.yaml +19 -0
- cumulusci/tests/shared_cassettes/GET_sobjects_Global_describe.yaml +1338 -0
- cumulusci/tests/shared_cassettes/GET_sobjects_Lead_describe.yaml +18 -0
- cumulusci/tests/shared_cassettes/GET_sobjects_OpportunityContactRole_describe.yaml +34 -0
- cumulusci/tests/shared_cassettes/GET_sobjects_Opportunity_describe.yaml +1261 -0
- cumulusci/tests/shared_cassettes/GET_sobjects_Organization.yaml +49 -0
- cumulusci/tests/shared_cassettes/vcr_string_templates/batchInfoList_xml.tpl +15 -0
- cumulusci/tests/shared_cassettes/vcr_string_templates/batchInfo_xml.tpl +13 -0
- cumulusci/tests/shared_cassettes/vcr_string_templates/jobInfo_insert_xml.tpl +24 -0
- cumulusci/tests/shared_cassettes/vcr_string_templates/jobInfo_upsert_xml.tpl +25 -0
- cumulusci/tests/test_entry_points.py +20 -0
- cumulusci/tests/test_integration_infrastructure.py +131 -0
- cumulusci/tests/test_main.py +9 -0
- cumulusci/tests/test_schema.py +32 -0
- cumulusci/tests/test_utils.py +657 -0
- cumulusci/tests/test_vcr_serializer.py +134 -0
- cumulusci/tests/uncompressed_cassette.yaml +83 -0
- cumulusci/tests/util.py +344 -0
- cumulusci/utils/__init__.py +731 -0
- cumulusci/utils/classutils.py +9 -0
- cumulusci/utils/collections.py +32 -0
- cumulusci/utils/deprecation.py +11 -0
- cumulusci/utils/encryption.py +31 -0
- cumulusci/utils/fileutils.py +295 -0
- cumulusci/utils/git.py +142 -0
- cumulusci/utils/http/multi_request.py +214 -0
- cumulusci/utils/http/requests_utils.py +103 -0
- cumulusci/utils/http/tests/cassettes/ManualEditTestCompositeParallelSalesforce.test_http_headers.yaml +32 -0
- cumulusci/utils/http/tests/cassettes/TestCompositeParallelSalesforce.test_composite_parallel_salesforce.yaml +65 -0
- cumulusci/utils/http/tests/cassettes/TestCompositeParallelSalesforce.test_errors.yaml +24 -0
- cumulusci/utils/http/tests/cassettes/TestCompositeParallelSalesforce.test_reference_ids.yaml +49 -0
- cumulusci/utils/http/tests/test_multi_request.py +255 -0
- cumulusci/utils/iterators.py +21 -0
- cumulusci/utils/logging.py +128 -0
- cumulusci/utils/metaprogramming.py +10 -0
- cumulusci/utils/options.py +138 -0
- cumulusci/utils/parallel/queries_in_parallel/run_queries_in_parallel.py +29 -0
- cumulusci/utils/parallel/queries_in_parallel/tests/test_run_queries_in_parallel.py +50 -0
- cumulusci/utils/parallel/task_worker_queues/parallel_worker.py +238 -0
- cumulusci/utils/parallel/task_worker_queues/parallel_worker_queue.py +243 -0
- cumulusci/utils/parallel/task_worker_queues/tests/test_parallel_worker.py +353 -0
- cumulusci/utils/salesforce/count_sobjects.py +46 -0
- cumulusci/utils/salesforce/soql.py +17 -0
- cumulusci/utils/salesforce/tests/cassettes/ManualEdit_TestCountSObjects.test_count_sobjects__network_errors.yaml +23 -0
- cumulusci/utils/salesforce/tests/cassettes/TestCountSObjects.test_count_sobjects__errors.yaml +33 -0
- cumulusci/utils/salesforce/tests/cassettes/TestCountSObjects.test_count_sobjects_simple.yaml +29 -0
- cumulusci/utils/salesforce/tests/test_count_sobjects.py +29 -0
- cumulusci/utils/salesforce/tests/test_soql.py +30 -0
- cumulusci/utils/tests/cassettes/ManualEditTestDescribeOrg.test_minimal_schema.yaml +36 -0
- cumulusci/utils/tests/cassettes/ManualEdit_test_describe_to_sql.yaml +191 -0
- cumulusci/utils/tests/test_fileutils.py +284 -0
- cumulusci/utils/tests/test_git.py +85 -0
- cumulusci/utils/tests/test_logging.py +70 -0
- cumulusci/utils/tests/test_option_parsing.py +188 -0
- cumulusci/utils/tests/test_org_schema.py +691 -0
- cumulusci/utils/tests/test_org_schema_models.py +79 -0
- cumulusci/utils/tests/test_waiting.py +25 -0
- cumulusci/utils/version_strings.py +391 -0
- cumulusci/utils/waiting.py +42 -0
- cumulusci/utils/xml/__init__.py +91 -0
- cumulusci/utils/xml/metadata_tree.py +299 -0
- cumulusci/utils/xml/robot_xml.py +114 -0
- cumulusci/utils/xml/salesforce_encoding.py +100 -0
- cumulusci/utils/xml/test/test_metadata_tree.py +251 -0
- cumulusci/utils/xml/test/test_salesforce_encoding.py +173 -0
- cumulusci/utils/yaml/cumulusci_yml.py +401 -0
- cumulusci/utils/yaml/model_parser.py +156 -0
- cumulusci/utils/yaml/safer_loader.py +74 -0
- cumulusci/utils/yaml/tests/bad_cci.yml +5 -0
- cumulusci/utils/yaml/tests/cassettes/TestCumulusciYml.test_validate_url__with_errors.yaml +20 -0
- cumulusci/utils/yaml/tests/test_cumulusci_yml.py +286 -0
- cumulusci/utils/yaml/tests/test_model_parser.py +175 -0
- cumulusci/utils/yaml/tests/test_safer_loader.py +88 -0
- cumulusci/utils/ziputils.py +61 -0
- cumulusci/vcs/base.py +143 -0
- cumulusci/vcs/bootstrap.py +272 -0
- cumulusci/vcs/github/__init__.py +24 -0
- cumulusci/vcs/github/adapter.py +689 -0
- cumulusci/vcs/github/release_notes/generator.py +219 -0
- cumulusci/vcs/github/release_notes/parser.py +151 -0
- cumulusci/vcs/github/release_notes/provider.py +143 -0
- cumulusci/vcs/github/service.py +569 -0
- cumulusci/vcs/github/tests/test_adapter.py +138 -0
- cumulusci/vcs/github/tests/test_service.py +408 -0
- cumulusci/vcs/models.py +586 -0
- cumulusci/vcs/tests/conftest.py +41 -0
- cumulusci/vcs/tests/dummy_service.py +241 -0
- cumulusci/vcs/tests/test_vcs_base.py +687 -0
- cumulusci/vcs/tests/test_vcs_bootstrap.py +727 -0
- cumulusci/vcs/utils/__init__.py +31 -0
- cumulusci/vcs/vcs_source.py +287 -0
- cumulusci_plus-5.0.0.dist-info/METADATA +145 -0
- cumulusci_plus-5.0.0.dist-info/RECORD +744 -0
- cumulusci_plus-5.0.0.dist-info/WHEEL +4 -0
- cumulusci_plus-5.0.0.dist-info/entry_points.txt +3 -0
- cumulusci_plus-5.0.0.dist-info/licenses/AUTHORS.rst +41 -0
- cumulusci_plus-5.0.0.dist-info/licenses/LICENSE +30 -0
|
@@ -0,0 +1,687 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
from typing import Optional
|
|
3
|
+
from unittest import mock
|
|
4
|
+
|
|
5
|
+
import pytest
|
|
6
|
+
|
|
7
|
+
from cumulusci.core.config import BaseProjectConfig, ServiceConfig, UniversalConfig
|
|
8
|
+
from cumulusci.core.dependencies.base import DynamicDependency
|
|
9
|
+
from cumulusci.core.keychain.base_project_keychain import BaseProjectKeychain
|
|
10
|
+
from cumulusci.tasks.release_notes.generator import BaseReleaseNotesGenerator
|
|
11
|
+
from cumulusci.vcs.base import VCSService
|
|
12
|
+
from cumulusci.vcs.models import AbstractRelease, AbstractRepo
|
|
13
|
+
from cumulusci.vcs.utils import AbstractCommitDir
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# Test fixtures
|
|
17
|
+
@pytest.fixture
|
|
18
|
+
def service_config():
|
|
19
|
+
return ServiceConfig(
|
|
20
|
+
{
|
|
21
|
+
"name": "test@example.com",
|
|
22
|
+
"password": "test123",
|
|
23
|
+
"username": "testuser",
|
|
24
|
+
"email": "test@example.com",
|
|
25
|
+
"token": "abcdef123456",
|
|
26
|
+
},
|
|
27
|
+
name="test_alias",
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
@pytest.fixture
|
|
32
|
+
def project_config():
|
|
33
|
+
universal_config = UniversalConfig()
|
|
34
|
+
project_config = BaseProjectConfig(universal_config, config={"no_yaml": True})
|
|
35
|
+
project_config.config["services"] = {
|
|
36
|
+
"github": {
|
|
37
|
+
"attributes": {"name": {"required": True}, "password": {}},
|
|
38
|
+
},
|
|
39
|
+
"test_service": {
|
|
40
|
+
"attributes": {"name": {"required": True}, "password": {}},
|
|
41
|
+
},
|
|
42
|
+
}
|
|
43
|
+
project_config.project = {"name": "TestProject"}
|
|
44
|
+
return project_config
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
@pytest.fixture
|
|
48
|
+
def keychain(project_config, service_config):
|
|
49
|
+
keychain = BaseProjectKeychain(project_config, None)
|
|
50
|
+
keychain.set_service("github", "test_alias", service_config)
|
|
51
|
+
keychain.set_service("test_service", "test_alias", service_config)
|
|
52
|
+
project_config.keychain = keychain
|
|
53
|
+
return keychain
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
# Mock implementations for testing
|
|
57
|
+
class MockDynamicDependency(DynamicDependency):
|
|
58
|
+
@classmethod
|
|
59
|
+
def sync_vcs_and_url(cls, values):
|
|
60
|
+
return values
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class MockReleaseNotesGenerator(BaseReleaseNotesGenerator):
|
|
64
|
+
def __init__(self):
|
|
65
|
+
pass
|
|
66
|
+
|
|
67
|
+
def __call__(self, *args, **kwargs):
|
|
68
|
+
return "Mock release notes"
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class MockCommitDir(AbstractCommitDir):
|
|
72
|
+
def __call__(
|
|
73
|
+
self, local_dir, branch, repo_dir=None, commit_message=None, dry_run=False
|
|
74
|
+
):
|
|
75
|
+
pass
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class MockRepo(AbstractRepo):
|
|
79
|
+
def __init__(self, **kwargs):
|
|
80
|
+
super().__init__(**kwargs)
|
|
81
|
+
|
|
82
|
+
def create_tag(
|
|
83
|
+
self,
|
|
84
|
+
tag_name: str,
|
|
85
|
+
message: str,
|
|
86
|
+
sha: str,
|
|
87
|
+
obj_type: str,
|
|
88
|
+
tagger={},
|
|
89
|
+
lightweight: Optional[bool] = False,
|
|
90
|
+
):
|
|
91
|
+
pass
|
|
92
|
+
|
|
93
|
+
def get_ref_for_tag(self, tag_name: str):
|
|
94
|
+
pass
|
|
95
|
+
|
|
96
|
+
def get_tag_by_ref(self, ref, tag_name: str = None):
|
|
97
|
+
pass
|
|
98
|
+
|
|
99
|
+
def branch(self, branch_name: str):
|
|
100
|
+
pass
|
|
101
|
+
|
|
102
|
+
def branches(self):
|
|
103
|
+
pass
|
|
104
|
+
|
|
105
|
+
def compare_commits(self, base: str, head: str, source: str):
|
|
106
|
+
pass
|
|
107
|
+
|
|
108
|
+
def merge(self, base: str, head: str, source: str, message: str = ""):
|
|
109
|
+
pass
|
|
110
|
+
|
|
111
|
+
def archive(self, format: str, zip_content, ref=None):
|
|
112
|
+
pass
|
|
113
|
+
|
|
114
|
+
def create_pull(
|
|
115
|
+
self,
|
|
116
|
+
title: str,
|
|
117
|
+
base: str,
|
|
118
|
+
head: str,
|
|
119
|
+
body: str = None,
|
|
120
|
+
maintainer_can_modify: bool = None,
|
|
121
|
+
options: dict = {},
|
|
122
|
+
):
|
|
123
|
+
pass
|
|
124
|
+
|
|
125
|
+
def create_release(
|
|
126
|
+
self,
|
|
127
|
+
tag_name: str,
|
|
128
|
+
name: str,
|
|
129
|
+
body: str = None,
|
|
130
|
+
draft: bool = False,
|
|
131
|
+
prerelease: bool = False,
|
|
132
|
+
options: dict = {},
|
|
133
|
+
):
|
|
134
|
+
pass
|
|
135
|
+
|
|
136
|
+
@property
|
|
137
|
+
def default_branch(self):
|
|
138
|
+
pass
|
|
139
|
+
|
|
140
|
+
def full_name(self):
|
|
141
|
+
pass
|
|
142
|
+
|
|
143
|
+
def get_commit(self, commit_sha: str):
|
|
144
|
+
pass
|
|
145
|
+
|
|
146
|
+
def pull_requests(self, **kwargs):
|
|
147
|
+
pass
|
|
148
|
+
|
|
149
|
+
def release_from_tag(self, tag_name: str):
|
|
150
|
+
pass
|
|
151
|
+
|
|
152
|
+
def releases(self):
|
|
153
|
+
pass
|
|
154
|
+
|
|
155
|
+
def get_pr_issue_labels(self, pull_request):
|
|
156
|
+
pass
|
|
157
|
+
|
|
158
|
+
def has_issues(self):
|
|
159
|
+
pass
|
|
160
|
+
|
|
161
|
+
def latest_release(self):
|
|
162
|
+
pass
|
|
163
|
+
|
|
164
|
+
@property
|
|
165
|
+
def owner_login(self):
|
|
166
|
+
pass
|
|
167
|
+
|
|
168
|
+
def directory_contents(self, subfolder: str, return_as, ref: str):
|
|
169
|
+
pass
|
|
170
|
+
|
|
171
|
+
@property
|
|
172
|
+
def clone_url(self):
|
|
173
|
+
return "https://github.com/test/repo.git"
|
|
174
|
+
|
|
175
|
+
def file_contents(self, file: str, ref: str):
|
|
176
|
+
pass
|
|
177
|
+
|
|
178
|
+
def get_latest_prerelease(self):
|
|
179
|
+
pass
|
|
180
|
+
|
|
181
|
+
def get_ref(self, ref_sha: str):
|
|
182
|
+
pass
|
|
183
|
+
|
|
184
|
+
def create_commit_status(
|
|
185
|
+
self,
|
|
186
|
+
commit_id: str,
|
|
187
|
+
context: str,
|
|
188
|
+
state: str,
|
|
189
|
+
description: str,
|
|
190
|
+
target_url: str,
|
|
191
|
+
):
|
|
192
|
+
pass
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
class MockRelease(AbstractRelease):
|
|
196
|
+
def __init__(self, tag_name="v1.0.0"):
|
|
197
|
+
self._tag_name = tag_name
|
|
198
|
+
|
|
199
|
+
@property
|
|
200
|
+
def tag_name(self) -> str:
|
|
201
|
+
return self._tag_name
|
|
202
|
+
|
|
203
|
+
@property
|
|
204
|
+
def body(self) -> str:
|
|
205
|
+
return "Release body"
|
|
206
|
+
|
|
207
|
+
@property
|
|
208
|
+
def prerelease(self) -> bool:
|
|
209
|
+
return False
|
|
210
|
+
|
|
211
|
+
@property
|
|
212
|
+
def name(self) -> str:
|
|
213
|
+
return self._tag_name
|
|
214
|
+
|
|
215
|
+
@property
|
|
216
|
+
def html_url(self) -> str:
|
|
217
|
+
return f"https://github.com/test/repo/releases/tag/{self._tag_name}"
|
|
218
|
+
|
|
219
|
+
@property
|
|
220
|
+
def created_at(self):
|
|
221
|
+
from datetime import datetime
|
|
222
|
+
|
|
223
|
+
return datetime.now()
|
|
224
|
+
|
|
225
|
+
@property
|
|
226
|
+
def draft(self) -> bool:
|
|
227
|
+
return False
|
|
228
|
+
|
|
229
|
+
@property
|
|
230
|
+
def tag_ref_name(self) -> str:
|
|
231
|
+
return f"refs/tags/{self._tag_name}"
|
|
232
|
+
|
|
233
|
+
@property
|
|
234
|
+
def version(self):
|
|
235
|
+
return "1.0.0"
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
# Concrete VCS Service implementations for testing
|
|
239
|
+
class ConcreteVCSService(VCSService):
|
|
240
|
+
service_type = "test_service"
|
|
241
|
+
|
|
242
|
+
@classmethod
|
|
243
|
+
def validate_service(cls, options, keychain):
|
|
244
|
+
return {"validated": True}
|
|
245
|
+
|
|
246
|
+
def get_repository(self, options={}):
|
|
247
|
+
return MockRepo()
|
|
248
|
+
|
|
249
|
+
def parse_repo_url(self):
|
|
250
|
+
return ["owner", "repo", "github.com"]
|
|
251
|
+
|
|
252
|
+
@classmethod
|
|
253
|
+
def get_service_for_url(cls, project_config, url, service_alias=None):
|
|
254
|
+
return (
|
|
255
|
+
cls(project_config) if url == "https://test_service.com/test/repo" else None
|
|
256
|
+
)
|
|
257
|
+
|
|
258
|
+
@property
|
|
259
|
+
def dynamic_dependency_class(self):
|
|
260
|
+
return MockDynamicDependency
|
|
261
|
+
|
|
262
|
+
def get_committer(self, repo: AbstractRepo):
|
|
263
|
+
return MockCommitDir()
|
|
264
|
+
|
|
265
|
+
def markdown(self, release: AbstractRelease, mode: str = "", context: str = ""):
|
|
266
|
+
return f"# {release.tag_name}\n{release.body}"
|
|
267
|
+
|
|
268
|
+
def parent_pr_notes_generator(self, repo: AbstractRepo):
|
|
269
|
+
return MockReleaseNotesGenerator()
|
|
270
|
+
|
|
271
|
+
def release_notes_generator(self, options: dict):
|
|
272
|
+
return MockReleaseNotesGenerator()
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
# Test class
|
|
276
|
+
class TestVCSService:
|
|
277
|
+
"""Comprehensive tests for VCSService abstract base class"""
|
|
278
|
+
|
|
279
|
+
def test_init_with_all_parameters(self, project_config, keychain):
|
|
280
|
+
"""Test VCSService initialization with all parameters"""
|
|
281
|
+
logger = logging.getLogger("test")
|
|
282
|
+
service = ConcreteVCSService(
|
|
283
|
+
project_config, name="test_alias", logger=logger, extra_param="extra"
|
|
284
|
+
)
|
|
285
|
+
|
|
286
|
+
assert service.config == project_config
|
|
287
|
+
assert service.name == "test_alias"
|
|
288
|
+
assert service.keychain == keychain
|
|
289
|
+
assert service.logger == logger
|
|
290
|
+
assert service.service_config.name == "test_alias"
|
|
291
|
+
|
|
292
|
+
def test_init_without_name(self, project_config, keychain):
|
|
293
|
+
"""Test VCSService initialization without name parameter"""
|
|
294
|
+
service = ConcreteVCSService(project_config)
|
|
295
|
+
|
|
296
|
+
# Should get service config for the service type without alias
|
|
297
|
+
assert service.config == project_config
|
|
298
|
+
assert service.keychain == keychain
|
|
299
|
+
assert isinstance(service.logger, logging.Logger)
|
|
300
|
+
|
|
301
|
+
def test_init_with_default_logger(self, project_config, keychain):
|
|
302
|
+
"""Test VCSService initialization creates default logger when none provided"""
|
|
303
|
+
service = ConcreteVCSService(project_config)
|
|
304
|
+
assert isinstance(service.logger, logging.Logger)
|
|
305
|
+
|
|
306
|
+
def test_service_type_property_class_attribute(self, project_config, keychain):
|
|
307
|
+
"""Test service_type property returns class attribute"""
|
|
308
|
+
service = ConcreteVCSService(project_config)
|
|
309
|
+
assert service.service_type == "test_service"
|
|
310
|
+
# Also test that the property returns the class attribute correctly
|
|
311
|
+
assert ConcreteVCSService.service_type == "test_service"
|
|
312
|
+
|
|
313
|
+
def test_service_type_property_raises_not_implemented(
|
|
314
|
+
self, project_config, keychain
|
|
315
|
+
):
|
|
316
|
+
"""Test service_type property raises NotImplementedError when defined as property"""
|
|
317
|
+
|
|
318
|
+
class VCSServiceWithPropertyServiceType(VCSService):
|
|
319
|
+
"""VCS Service with service_type as a property instead of class attribute"""
|
|
320
|
+
|
|
321
|
+
@classmethod
|
|
322
|
+
def validate_service(cls, options, keychain):
|
|
323
|
+
return {}
|
|
324
|
+
|
|
325
|
+
@property
|
|
326
|
+
def dynamic_dependency_class(self):
|
|
327
|
+
return MockDynamicDependency
|
|
328
|
+
|
|
329
|
+
def get_repository(self, options={}):
|
|
330
|
+
return MockRepo()
|
|
331
|
+
|
|
332
|
+
def parse_repo_url(self):
|
|
333
|
+
return ["owner", "repo", "example.com"]
|
|
334
|
+
|
|
335
|
+
@classmethod
|
|
336
|
+
def get_service_for_url(cls, project_config, url, service_alias=None):
|
|
337
|
+
return cls(project_config)
|
|
338
|
+
|
|
339
|
+
def get_committer(self, repo: AbstractRepo):
|
|
340
|
+
return MockCommitDir()
|
|
341
|
+
|
|
342
|
+
def markdown(
|
|
343
|
+
self, release: AbstractRelease, mode: str = "", context: str = ""
|
|
344
|
+
):
|
|
345
|
+
return "markdown"
|
|
346
|
+
|
|
347
|
+
def parent_pr_notes_generator(self, repo: AbstractRepo):
|
|
348
|
+
return MockReleaseNotesGenerator()
|
|
349
|
+
|
|
350
|
+
def release_notes_generator(self, options: dict):
|
|
351
|
+
return MockReleaseNotesGenerator()
|
|
352
|
+
|
|
353
|
+
# Mock the project config to avoid keychain issues
|
|
354
|
+
mock_config = mock.Mock()
|
|
355
|
+
mock_keychain = mock.Mock()
|
|
356
|
+
mock_service_config = mock.Mock()
|
|
357
|
+
mock_service_config.name = "test"
|
|
358
|
+
mock_keychain.get_service.side_effect = (
|
|
359
|
+
lambda service_type, name: mock_service_config
|
|
360
|
+
)
|
|
361
|
+
mock_config.keychain = mock_keychain
|
|
362
|
+
|
|
363
|
+
# The NotImplementedError should be raised during initialization when accessing service_type
|
|
364
|
+
with pytest.raises(
|
|
365
|
+
NotImplementedError,
|
|
366
|
+
match="Subclasses should define the service_type property",
|
|
367
|
+
):
|
|
368
|
+
VCSServiceWithPropertyServiceType(mock_config)
|
|
369
|
+
|
|
370
|
+
def test_dynamic_dependency_class_property(self, project_config, keychain):
|
|
371
|
+
"""Test dynamic_dependency_class property returns correct class"""
|
|
372
|
+
service = ConcreteVCSService(project_config)
|
|
373
|
+
assert service.dynamic_dependency_class == MockDynamicDependency
|
|
374
|
+
|
|
375
|
+
def test_validate_service_class_method(self):
|
|
376
|
+
"""Test validate_service class method"""
|
|
377
|
+
result = ConcreteVCSService.validate_service({}, None)
|
|
378
|
+
assert result == {"validated": True}
|
|
379
|
+
|
|
380
|
+
def test_get_service_for_url_class_method(self, project_config, keychain):
|
|
381
|
+
"""Test get_service_for_url class method"""
|
|
382
|
+
service = ConcreteVCSService.get_service_for_url(
|
|
383
|
+
project_config, "https://test_service.com/test/repo", {}
|
|
384
|
+
)
|
|
385
|
+
assert isinstance(service, ConcreteVCSService)
|
|
386
|
+
|
|
387
|
+
def test_registered_services_class_method(self):
|
|
388
|
+
"""Test registered_services class method returns all subclasses"""
|
|
389
|
+
services = VCSService.registered_services()
|
|
390
|
+
assert len(services) > 0
|
|
391
|
+
# Should include our test classes
|
|
392
|
+
service_names = [cls.__name__ for cls in services]
|
|
393
|
+
assert "ConcreteVCSService" in service_names
|
|
394
|
+
|
|
395
|
+
def test_get_repository_method(self, project_config, keychain):
|
|
396
|
+
"""Test get_repository method"""
|
|
397
|
+
service = ConcreteVCSService(project_config)
|
|
398
|
+
repo = service.get_repository()
|
|
399
|
+
assert isinstance(repo, MockRepo)
|
|
400
|
+
|
|
401
|
+
def test_get_repository_with_options(self, project_config, keychain):
|
|
402
|
+
"""Test get_repository method with options"""
|
|
403
|
+
service = ConcreteVCSService(project_config)
|
|
404
|
+
repo = service.get_repository({"option": "value"})
|
|
405
|
+
assert isinstance(repo, MockRepo)
|
|
406
|
+
|
|
407
|
+
def test_parse_repo_url_method(self, project_config, keychain):
|
|
408
|
+
"""Test parse_repo_url method"""
|
|
409
|
+
service = ConcreteVCSService(project_config)
|
|
410
|
+
result = service.parse_repo_url()
|
|
411
|
+
assert result == ["owner", "repo", "github.com"]
|
|
412
|
+
|
|
413
|
+
def test_get_committer_method(self, project_config, keychain):
|
|
414
|
+
"""Test get_committer method"""
|
|
415
|
+
service = ConcreteVCSService(project_config)
|
|
416
|
+
repo = MockRepo()
|
|
417
|
+
committer = service.get_committer(repo)
|
|
418
|
+
assert isinstance(committer, MockCommitDir)
|
|
419
|
+
|
|
420
|
+
def test_markdown_method(self, project_config, keychain):
|
|
421
|
+
"""Test markdown method"""
|
|
422
|
+
service = ConcreteVCSService(project_config)
|
|
423
|
+
release = MockRelease("v1.0.0")
|
|
424
|
+
result = service.markdown(release, "mode", "context")
|
|
425
|
+
assert result == "# v1.0.0\nRelease body"
|
|
426
|
+
|
|
427
|
+
def test_markdown_method_with_defaults(self, project_config, keychain):
|
|
428
|
+
"""Test markdown method with default parameters"""
|
|
429
|
+
service = ConcreteVCSService(project_config)
|
|
430
|
+
release = MockRelease("v2.0.0")
|
|
431
|
+
result = service.markdown(release)
|
|
432
|
+
assert result == "# v2.0.0\nRelease body"
|
|
433
|
+
|
|
434
|
+
def test_release_notes_generator_method(self, project_config, keychain):
|
|
435
|
+
"""Test release_notes_generator method"""
|
|
436
|
+
service = ConcreteVCSService(project_config)
|
|
437
|
+
generator = service.release_notes_generator({})
|
|
438
|
+
assert isinstance(generator, MockReleaseNotesGenerator)
|
|
439
|
+
|
|
440
|
+
def test_parent_pr_notes_generator_method(self, project_config, keychain):
|
|
441
|
+
"""Test parent_pr_notes_generator method"""
|
|
442
|
+
service = ConcreteVCSService(project_config)
|
|
443
|
+
repo = MockRepo()
|
|
444
|
+
generator = service.parent_pr_notes_generator(repo)
|
|
445
|
+
assert isinstance(generator, MockReleaseNotesGenerator)
|
|
446
|
+
|
|
447
|
+
def test_abstract_base_class_cannot_be_instantiated(self):
|
|
448
|
+
"""Test that VCSService abstract base class cannot be instantiated directly"""
|
|
449
|
+
with pytest.raises(
|
|
450
|
+
TypeError, match="Can't instantiate abstract class VCSService"
|
|
451
|
+
):
|
|
452
|
+
VCSService(None)
|
|
453
|
+
|
|
454
|
+
def test_incomplete_subclass_cannot_be_instantiated(self, project_config):
|
|
455
|
+
"""Test that incomplete subclass missing abstract methods cannot be instantiated"""
|
|
456
|
+
|
|
457
|
+
class IncompleteVCSService(VCSService):
|
|
458
|
+
"""VCS Service missing some abstract method implementations"""
|
|
459
|
+
|
|
460
|
+
service_type = "incomplete"
|
|
461
|
+
|
|
462
|
+
@classmethod
|
|
463
|
+
def validate_service(cls, options, keychain):
|
|
464
|
+
return {}
|
|
465
|
+
|
|
466
|
+
@property
|
|
467
|
+
def dynamic_dependency_class(self):
|
|
468
|
+
return MockDynamicDependency
|
|
469
|
+
|
|
470
|
+
def get_repository(self, options={}):
|
|
471
|
+
return MockRepo()
|
|
472
|
+
|
|
473
|
+
# Missing parse_repo_url, get_service_for_url, etc.
|
|
474
|
+
|
|
475
|
+
with pytest.raises(TypeError, match="Can't instantiate abstract class"):
|
|
476
|
+
IncompleteVCSService(project_config)
|
|
477
|
+
|
|
478
|
+
def test_abstract_methods_raise_not_implemented_error(self):
|
|
479
|
+
"""Test that abstract methods raise NotImplementedError when called directly"""
|
|
480
|
+
|
|
481
|
+
# Create a minimal implementation just to test the abstract methods
|
|
482
|
+
class MinimalVCSService(VCSService):
|
|
483
|
+
service_type = "minimal"
|
|
484
|
+
|
|
485
|
+
@classmethod
|
|
486
|
+
def validate_service(cls, options, keychain):
|
|
487
|
+
return {}
|
|
488
|
+
|
|
489
|
+
@property
|
|
490
|
+
def dynamic_dependency_class(self):
|
|
491
|
+
return MockDynamicDependency
|
|
492
|
+
|
|
493
|
+
def get_repository(self, options={}):
|
|
494
|
+
return MockRepo()
|
|
495
|
+
|
|
496
|
+
def parse_repo_url(self):
|
|
497
|
+
return []
|
|
498
|
+
|
|
499
|
+
@classmethod
|
|
500
|
+
def get_service_for_url(cls, project_config, url, service_alias=None):
|
|
501
|
+
return cls(project_config)
|
|
502
|
+
|
|
503
|
+
def get_committer(self, repo):
|
|
504
|
+
return MockCommitDir()
|
|
505
|
+
|
|
506
|
+
def markdown(self, release, mode="", context=""):
|
|
507
|
+
return ""
|
|
508
|
+
|
|
509
|
+
def parent_pr_notes_generator(self, repo):
|
|
510
|
+
return MockReleaseNotesGenerator()
|
|
511
|
+
|
|
512
|
+
def release_notes_generator(self, options: dict):
|
|
513
|
+
return MockReleaseNotesGenerator()
|
|
514
|
+
|
|
515
|
+
# Test that we can instantiate this minimal implementation
|
|
516
|
+
mock_config = mock.Mock()
|
|
517
|
+
mock_keychain = mock.Mock()
|
|
518
|
+
mock_service_config = mock.Mock()
|
|
519
|
+
mock_service_config.name = "test"
|
|
520
|
+
mock_keychain.get_service.return_value = mock_service_config
|
|
521
|
+
mock_config.keychain = mock_keychain
|
|
522
|
+
|
|
523
|
+
service = MinimalVCSService(mock_config)
|
|
524
|
+
assert isinstance(service, VCSService)
|
|
525
|
+
|
|
526
|
+
def test_service_config_attribute_access(self, project_config, keychain):
|
|
527
|
+
"""Test that service_config is properly set and accessible"""
|
|
528
|
+
service = ConcreteVCSService(project_config, name="test_alias")
|
|
529
|
+
assert hasattr(service, "service_config")
|
|
530
|
+
assert service.service_config.name == "test_alias"
|
|
531
|
+
|
|
532
|
+
def test_logger_attribute_access(self, project_config, keychain):
|
|
533
|
+
"""Test that logger attribute is accessible"""
|
|
534
|
+
service = ConcreteVCSService(project_config)
|
|
535
|
+
assert hasattr(service, "logger")
|
|
536
|
+
assert isinstance(service.logger, logging.Logger)
|
|
537
|
+
|
|
538
|
+
def test_config_attribute_access(self, project_config, keychain):
|
|
539
|
+
"""Test that config attribute is accessible"""
|
|
540
|
+
service = ConcreteVCSService(project_config)
|
|
541
|
+
assert hasattr(service, "config")
|
|
542
|
+
assert service.config == project_config
|
|
543
|
+
|
|
544
|
+
def test_keychain_attribute_access(self, project_config, keychain):
|
|
545
|
+
"""Test that keychain attribute is accessible"""
|
|
546
|
+
service = ConcreteVCSService(project_config)
|
|
547
|
+
assert hasattr(service, "keychain")
|
|
548
|
+
assert service.keychain == keychain
|
|
549
|
+
|
|
550
|
+
def test_name_attribute_access(self, project_config, keychain):
|
|
551
|
+
"""Test that name attribute is accessible"""
|
|
552
|
+
service = ConcreteVCSService(project_config, name="test_alias")
|
|
553
|
+
assert hasattr(service, "name")
|
|
554
|
+
# Name should come from service_config.name or the provided name
|
|
555
|
+
assert service.name == "test_alias"
|
|
556
|
+
|
|
557
|
+
def test_service_registry_class_attribute(self):
|
|
558
|
+
"""Test that _service_registry class attribute exists"""
|
|
559
|
+
assert hasattr(VCSService, "_service_registry")
|
|
560
|
+
assert isinstance(VCSService._service_registry, list)
|
|
561
|
+
|
|
562
|
+
def test_multiple_service_instances(self, project_config, keychain):
|
|
563
|
+
"""Test creating multiple service instances"""
|
|
564
|
+
service1 = ConcreteVCSService(project_config, name="test_alias")
|
|
565
|
+
service2 = ConcreteVCSService(project_config, name="test_alias")
|
|
566
|
+
|
|
567
|
+
assert service1.config == service2.config
|
|
568
|
+
assert service1.keychain == service2.keychain
|
|
569
|
+
# Names should be the same if they both resolve to the same service config
|
|
570
|
+
assert service1.name == service2.name
|
|
571
|
+
|
|
572
|
+
def test_service_with_custom_logger(self, project_config, keychain):
|
|
573
|
+
"""Test service initialization with custom logger"""
|
|
574
|
+
custom_logger = logging.getLogger("custom")
|
|
575
|
+
custom_logger.setLevel(logging.DEBUG)
|
|
576
|
+
|
|
577
|
+
service = ConcreteVCSService(project_config, logger=custom_logger)
|
|
578
|
+
assert service.logger == custom_logger
|
|
579
|
+
assert service.logger.name == "custom"
|
|
580
|
+
|
|
581
|
+
def test_registered_services_returns_set(self):
|
|
582
|
+
"""Test registered_services method returns a set of all subclasses"""
|
|
583
|
+
services = VCSService.registered_services()
|
|
584
|
+
assert isinstance(services, set)
|
|
585
|
+
assert len(services) >= 1 # Should have at least the GitHub service
|
|
586
|
+
|
|
587
|
+
def test_kwargs_handling_in_init(self, project_config, keychain):
|
|
588
|
+
"""Test that additional kwargs are handled properly in __init__"""
|
|
589
|
+
service = ConcreteVCSService(
|
|
590
|
+
project_config, name="test_alias", extra_param="value", another_param=123
|
|
591
|
+
)
|
|
592
|
+
# Should not raise an error and should initialize properly
|
|
593
|
+
assert isinstance(service, ConcreteVCSService)
|
|
594
|
+
|
|
595
|
+
def test_service_type_inheritance(self):
|
|
596
|
+
"""Test that service_type is properly inherited"""
|
|
597
|
+
|
|
598
|
+
class ChildVCSService(ConcreteVCSService):
|
|
599
|
+
service_type = "child_service"
|
|
600
|
+
|
|
601
|
+
# Create a mock project config for testing
|
|
602
|
+
mock_config = mock.Mock()
|
|
603
|
+
mock_keychain = mock.Mock()
|
|
604
|
+
mock_service_config = mock.Mock()
|
|
605
|
+
mock_service_config.name = "test"
|
|
606
|
+
mock_keychain.get_service.return_value = mock_service_config
|
|
607
|
+
mock_config.keychain = mock_keychain
|
|
608
|
+
|
|
609
|
+
service = ChildVCSService(mock_config)
|
|
610
|
+
assert service.service_type == "child_service"
|
|
611
|
+
|
|
612
|
+
def test_empty_options_handling(self, project_config, keychain):
|
|
613
|
+
"""Test methods handle empty options dictionaries properly"""
|
|
614
|
+
service = ConcreteVCSService(project_config)
|
|
615
|
+
|
|
616
|
+
# Test get_repository with empty options
|
|
617
|
+
repo = service.get_repository({})
|
|
618
|
+
assert isinstance(repo, MockRepo)
|
|
619
|
+
|
|
620
|
+
# Test get_service_for_url with empty alias
|
|
621
|
+
result = ConcreteVCSService.get_service_for_url(
|
|
622
|
+
project_config, "https://test_service.com/test/repo", ""
|
|
623
|
+
)
|
|
624
|
+
assert isinstance(result, ConcreteVCSService)
|
|
625
|
+
|
|
626
|
+
def test_none_parameters_handling(self, project_config, keychain):
|
|
627
|
+
"""Test that None parameters are handled gracefully"""
|
|
628
|
+
service = ConcreteVCSService(project_config, name=None)
|
|
629
|
+
assert isinstance(service, ConcreteVCSService)
|
|
630
|
+
# Name should be from service config
|
|
631
|
+
assert service.name is not None
|
|
632
|
+
|
|
633
|
+
def test_service_name_property(self, project_config, keychain):
|
|
634
|
+
"""Test that service name is properly set from service config"""
|
|
635
|
+
service = ConcreteVCSService(project_config, name="test_alias")
|
|
636
|
+
assert service.name == "test_alias"
|
|
637
|
+
|
|
638
|
+
def test_logger_default_name(self, project_config, keychain):
|
|
639
|
+
"""Test that default logger has correct name"""
|
|
640
|
+
service = ConcreteVCSService(project_config)
|
|
641
|
+
# The logger name is set to the module name of the VCS base class, not the concrete class
|
|
642
|
+
assert service.logger.name == "cumulusci.vcs.base"
|
|
643
|
+
|
|
644
|
+
def test_keychain_from_config(self, project_config, keychain):
|
|
645
|
+
"""Test that keychain is properly retrieved from config"""
|
|
646
|
+
service = ConcreteVCSService(project_config)
|
|
647
|
+
assert service.keychain is project_config.keychain
|
|
648
|
+
assert service.keychain is keychain
|
|
649
|
+
|
|
650
|
+
def test_service_config_retrieval_with_name(self, project_config, keychain):
|
|
651
|
+
"""Test service config retrieval with specific name"""
|
|
652
|
+
service = ConcreteVCSService(project_config, name="test_alias")
|
|
653
|
+
# Should call keychain.get_service with correct parameters
|
|
654
|
+
assert service.service_config is not None
|
|
655
|
+
assert service.service_config.name == "test_alias"
|
|
656
|
+
|
|
657
|
+
def test_service_config_retrieval_without_name(self, project_config, keychain):
|
|
658
|
+
"""Test service config retrieval without name (default service)"""
|
|
659
|
+
service = ConcreteVCSService(project_config)
|
|
660
|
+
# Should call keychain.get_service with service_type and None for name
|
|
661
|
+
assert service.service_config is not None
|
|
662
|
+
|
|
663
|
+
def test_service_type_property_return_path(self, project_config, keychain):
|
|
664
|
+
"""Test service_type property return path for class attribute"""
|
|
665
|
+
# Test the existing ConcreteVCSService to ensure we hit the return path
|
|
666
|
+
service = ConcreteVCSService(project_config)
|
|
667
|
+
# Access service_type multiple times to ensure coverage
|
|
668
|
+
assert service.service_type == "test_service"
|
|
669
|
+
assert service.service_type == "test_service"
|
|
670
|
+
|
|
671
|
+
# Also test accessing it directly from the class
|
|
672
|
+
assert ConcreteVCSService.service_type == "test_service"
|
|
673
|
+
|
|
674
|
+
def test_service_type_property_implementation(self, project_config, keychain):
|
|
675
|
+
"""Test service_type property implementation details"""
|
|
676
|
+
service = ConcreteVCSService(project_config)
|
|
677
|
+
|
|
678
|
+
# Test that service_type is not a property instance on the class
|
|
679
|
+
assert not isinstance(ConcreteVCSService.__dict__.get("service_type"), property)
|
|
680
|
+
|
|
681
|
+
# Test that accessing service_type returns the class attribute
|
|
682
|
+
assert service.service_type == ConcreteVCSService.service_type
|
|
683
|
+
|
|
684
|
+
# Test the property getter directly
|
|
685
|
+
service_type_prop = VCSService.__dict__["service_type"]
|
|
686
|
+
assert isinstance(service_type_prop, property)
|
|
687
|
+
assert service_type_prop.fget(service) == "test_service"
|