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,823 @@
|
|
|
1
|
+
import json
|
|
2
|
+
import tempfile
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
from unittest import mock
|
|
5
|
+
|
|
6
|
+
import pytest
|
|
7
|
+
import responses
|
|
8
|
+
|
|
9
|
+
from cumulusci.core.config import ServiceConfig, TaskConfig
|
|
10
|
+
from cumulusci.core.exceptions import (
|
|
11
|
+
GithubApiNotFoundError,
|
|
12
|
+
TaskOptionsError,
|
|
13
|
+
VcsException,
|
|
14
|
+
)
|
|
15
|
+
from cumulusci.tasks.github.tests.util_github_api import GithubApiTestMixin
|
|
16
|
+
from cumulusci.tasks.vcs.publish import PublishSubtree
|
|
17
|
+
from cumulusci.tests.util import create_project_config
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class TestPublishSubtree(GithubApiTestMixin):
|
|
21
|
+
def setup_method(self):
|
|
22
|
+
self.repo_owner = "TestOwner"
|
|
23
|
+
self.repo_name = "TestRepo"
|
|
24
|
+
self.repo_api_url = (
|
|
25
|
+
f"https://api.github.com/repos/{self.repo_owner}/{self.repo_name}"
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
self.public_owner = "TestOwner"
|
|
29
|
+
self.public_name = "PublicRepo"
|
|
30
|
+
self.public_repo_url = (
|
|
31
|
+
f"https://api.github.com/repos/{self.public_owner}/{self.public_name}"
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
self.project_config = create_project_config(self.repo_name, self.repo_owner)
|
|
35
|
+
self.project_config.keychain.set_service(
|
|
36
|
+
"github",
|
|
37
|
+
"test_alias",
|
|
38
|
+
ServiceConfig(
|
|
39
|
+
{
|
|
40
|
+
"username": "TestUser",
|
|
41
|
+
"token": "TestPass",
|
|
42
|
+
"email": "testuser@testdomain.com",
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
def test_run_task__invalid_version_option_value(self):
|
|
48
|
+
task_config = TaskConfig(
|
|
49
|
+
{
|
|
50
|
+
"options": {
|
|
51
|
+
"branch": "main",
|
|
52
|
+
"version": "invalue_value",
|
|
53
|
+
"create_release": True,
|
|
54
|
+
"repo_url": self.public_repo_url,
|
|
55
|
+
"includes": ["tasks/foo.py", "unpackaged/pre/foo/package.xml"],
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
with pytest.raises(TaskOptionsError):
|
|
61
|
+
PublishSubtree(self.project_config, task_config)
|
|
62
|
+
|
|
63
|
+
@mock.patch("cumulusci.tasks.vcs.publish.download_extract_vcs_from_repo")
|
|
64
|
+
@mock.patch("cumulusci.vcs.github.service.CommitDir")
|
|
65
|
+
def test_run_task_tag_name__explicit_tag_name(self, commit_dir, extract_github):
|
|
66
|
+
mock_committer_instance = mock.Mock()
|
|
67
|
+
commit_dir.return_value = mock_committer_instance
|
|
68
|
+
mock_final_commit_object = mock.Mock()
|
|
69
|
+
mock_committer_instance.return_value = mock_final_commit_object
|
|
70
|
+
mock_final_commit_object.sha = "SHA"
|
|
71
|
+
|
|
72
|
+
with responses.RequestsMock() as rsps:
|
|
73
|
+
rsps.add(
|
|
74
|
+
method=responses.GET,
|
|
75
|
+
url=self.repo_api_url,
|
|
76
|
+
json=self._get_expected_repo(
|
|
77
|
+
owner=self.repo_owner, name=self.repo_name
|
|
78
|
+
),
|
|
79
|
+
)
|
|
80
|
+
rsps.add(
|
|
81
|
+
method=responses.GET,
|
|
82
|
+
url=self.public_repo_url,
|
|
83
|
+
json=self._get_expected_repo(
|
|
84
|
+
owner=self.public_owner, name=self.public_name
|
|
85
|
+
),
|
|
86
|
+
)
|
|
87
|
+
rsps.add(
|
|
88
|
+
method=responses.GET,
|
|
89
|
+
url=self.repo_api_url + "/git/ref/tags/release/1.0",
|
|
90
|
+
status=200,
|
|
91
|
+
json=self._get_expected_tag_ref("release/1.0", "SHA"),
|
|
92
|
+
)
|
|
93
|
+
rsps.add(
|
|
94
|
+
method=responses.GET,
|
|
95
|
+
url=self.repo_api_url + "/git/tags/SHA",
|
|
96
|
+
json=self._get_expected_tag(
|
|
97
|
+
"release/1.0", "SHA", message="Release Message"
|
|
98
|
+
),
|
|
99
|
+
status=200,
|
|
100
|
+
)
|
|
101
|
+
rsps.add(
|
|
102
|
+
responses.GET,
|
|
103
|
+
self.repo_api_url + "/releases/tags/release/1.0",
|
|
104
|
+
json=self._get_expected_release("release/1.0"),
|
|
105
|
+
)
|
|
106
|
+
rsps.add(
|
|
107
|
+
responses.GET,
|
|
108
|
+
self.public_repo_url + "/git/ref/tags/release/1.0",
|
|
109
|
+
status=404,
|
|
110
|
+
)
|
|
111
|
+
rsps.add(
|
|
112
|
+
responses.POST,
|
|
113
|
+
self.public_repo_url + "/git/tags",
|
|
114
|
+
json=self._get_expected_tag(
|
|
115
|
+
"beta/1.0-Beta_1", "21e04cfe480f5293e2f7103eee8a5cbdb94f7982"
|
|
116
|
+
),
|
|
117
|
+
status=201,
|
|
118
|
+
)
|
|
119
|
+
rsps.add(
|
|
120
|
+
responses.POST, self.public_repo_url + "/git/refs", json={}, status=201
|
|
121
|
+
)
|
|
122
|
+
rsps.add(
|
|
123
|
+
responses.POST,
|
|
124
|
+
self.public_repo_url + "/releases",
|
|
125
|
+
json=self._get_expected_release("release"),
|
|
126
|
+
)
|
|
127
|
+
task_config = TaskConfig(
|
|
128
|
+
{
|
|
129
|
+
"options": {
|
|
130
|
+
"branch": "main",
|
|
131
|
+
"tag_name": "release/1.0",
|
|
132
|
+
"create_release": True,
|
|
133
|
+
"repo_url": self.public_repo_url,
|
|
134
|
+
"includes": ["tasks/foo.py", "unpackaged/pre/foo/package.xml"],
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
)
|
|
138
|
+
extract_github.return_value.namelist.return_value = [
|
|
139
|
+
"tasks/foo.py",
|
|
140
|
+
"unpackaged/pre/foo/package.xml",
|
|
141
|
+
"force-app",
|
|
142
|
+
]
|
|
143
|
+
|
|
144
|
+
task = PublishSubtree(self.project_config, task_config)
|
|
145
|
+
task()
|
|
146
|
+
|
|
147
|
+
expected_release_body = json.dumps(
|
|
148
|
+
{
|
|
149
|
+
"tag_name": "release/1.0",
|
|
150
|
+
"name": "1.0",
|
|
151
|
+
"body": "",
|
|
152
|
+
"draft": False,
|
|
153
|
+
"prerelease": False,
|
|
154
|
+
}
|
|
155
|
+
)
|
|
156
|
+
create_release_call = rsps.calls[8]
|
|
157
|
+
assert create_release_call.request.url == self.public_repo_url + "/releases"
|
|
158
|
+
assert create_release_call.request.method == responses.POST
|
|
159
|
+
assert create_release_call.request.body == expected_release_body
|
|
160
|
+
|
|
161
|
+
@mock.patch("cumulusci.tasks.vcs.publish.download_extract_vcs_from_repo")
|
|
162
|
+
@mock.patch("cumulusci.vcs.github.service.CommitDir")
|
|
163
|
+
def test_run_task_tag_name__latest(self, commit_dir, extract_github):
|
|
164
|
+
with responses.RequestsMock() as rsps:
|
|
165
|
+
rsps.add(
|
|
166
|
+
method=responses.GET,
|
|
167
|
+
url=self.repo_api_url,
|
|
168
|
+
json=self._get_expected_repo(
|
|
169
|
+
owner=self.repo_owner, name=self.repo_name
|
|
170
|
+
),
|
|
171
|
+
)
|
|
172
|
+
rsps.add(
|
|
173
|
+
method=responses.GET,
|
|
174
|
+
url=self.public_repo_url,
|
|
175
|
+
json=self._get_expected_repo(
|
|
176
|
+
owner=self.public_owner, name=self.public_name
|
|
177
|
+
),
|
|
178
|
+
)
|
|
179
|
+
rsps.add(
|
|
180
|
+
method=responses.GET,
|
|
181
|
+
url=self.repo_api_url + "/releases/latest",
|
|
182
|
+
status=200,
|
|
183
|
+
json=self._get_expected_release("release/1.0"),
|
|
184
|
+
)
|
|
185
|
+
rsps.add(
|
|
186
|
+
method=responses.GET,
|
|
187
|
+
url=self.repo_api_url + "/git/ref/tags/release/1.0",
|
|
188
|
+
status=200,
|
|
189
|
+
json=self._get_expected_tag_ref("release/1.0", "SHA"),
|
|
190
|
+
)
|
|
191
|
+
rsps.add(
|
|
192
|
+
method=responses.GET,
|
|
193
|
+
url=self.repo_api_url + "/git/tags/SHA",
|
|
194
|
+
json=self._get_expected_tag("release/1.0", "SHA"),
|
|
195
|
+
status=200,
|
|
196
|
+
)
|
|
197
|
+
rsps.add(
|
|
198
|
+
responses.GET,
|
|
199
|
+
self.repo_api_url + "/releases/tags/release/1.0",
|
|
200
|
+
json=self._get_expected_release("release/1.0"),
|
|
201
|
+
)
|
|
202
|
+
rsps.add(
|
|
203
|
+
responses.GET,
|
|
204
|
+
self.public_repo_url + "/git/ref/tags/release/1.0",
|
|
205
|
+
status=404,
|
|
206
|
+
)
|
|
207
|
+
rsps.add(
|
|
208
|
+
responses.POST,
|
|
209
|
+
self.public_repo_url + "/releases",
|
|
210
|
+
json=self._get_expected_release("release"),
|
|
211
|
+
)
|
|
212
|
+
task_config = TaskConfig(
|
|
213
|
+
{
|
|
214
|
+
"options": {
|
|
215
|
+
"branch": "main",
|
|
216
|
+
"tag_name": "latest",
|
|
217
|
+
"create_release": True,
|
|
218
|
+
"repo_url": self.public_repo_url,
|
|
219
|
+
"includes": ["tasks/foo.py", "unpackaged/pre/foo/package.xml"],
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
)
|
|
223
|
+
extract_github.return_value.namelist.return_value = [
|
|
224
|
+
"tasks/foo.py",
|
|
225
|
+
"unpackaged/pre/foo/package.xml",
|
|
226
|
+
"force-app",
|
|
227
|
+
]
|
|
228
|
+
|
|
229
|
+
task = PublishSubtree(self.project_config, task_config)
|
|
230
|
+
task()
|
|
231
|
+
|
|
232
|
+
expected_release_body = json.dumps(
|
|
233
|
+
{
|
|
234
|
+
"tag_name": "release/1.0",
|
|
235
|
+
"name": "1.0",
|
|
236
|
+
"body": "",
|
|
237
|
+
"draft": False,
|
|
238
|
+
"prerelease": False,
|
|
239
|
+
}
|
|
240
|
+
)
|
|
241
|
+
create_release_call = rsps.calls[7]
|
|
242
|
+
assert create_release_call.request.url == self.public_repo_url + "/releases"
|
|
243
|
+
assert create_release_call.request.method == responses.POST
|
|
244
|
+
assert create_release_call.request.body == expected_release_body
|
|
245
|
+
|
|
246
|
+
@mock.patch("cumulusci.tasks.vcs.publish.download_extract_vcs_from_repo")
|
|
247
|
+
@mock.patch("cumulusci.vcs.github.service.CommitDir")
|
|
248
|
+
def test_run_task_version(self, commit_dir, extract_github):
|
|
249
|
+
mock_committer_instance = mock.Mock()
|
|
250
|
+
commit_dir.return_value = mock_committer_instance
|
|
251
|
+
mock_final_commit_object = mock.Mock()
|
|
252
|
+
mock_committer_instance.return_value = mock_final_commit_object
|
|
253
|
+
mock_final_commit_object.sha = "SHA"
|
|
254
|
+
|
|
255
|
+
with responses.RequestsMock() as rsps:
|
|
256
|
+
rsps.add(
|
|
257
|
+
method=responses.GET,
|
|
258
|
+
url=self.repo_api_url,
|
|
259
|
+
json=self._get_expected_repo(
|
|
260
|
+
owner=self.repo_owner, name=self.repo_name
|
|
261
|
+
),
|
|
262
|
+
)
|
|
263
|
+
rsps.add(
|
|
264
|
+
method=responses.GET,
|
|
265
|
+
url=self.public_repo_url,
|
|
266
|
+
json=self._get_expected_repo(
|
|
267
|
+
owner=self.public_owner, name=self.public_name
|
|
268
|
+
),
|
|
269
|
+
)
|
|
270
|
+
rsps.add(
|
|
271
|
+
method=responses.GET,
|
|
272
|
+
url=self.repo_api_url + "/releases",
|
|
273
|
+
status=200,
|
|
274
|
+
json=self._get_expected_releases(
|
|
275
|
+
"TestOwner", "TestRepo", ["beta/1.0-Beta_1"]
|
|
276
|
+
),
|
|
277
|
+
)
|
|
278
|
+
rsps.add(
|
|
279
|
+
method=responses.GET,
|
|
280
|
+
url=self.repo_api_url + "/git/ref/tags/beta/1.0-Beta_1",
|
|
281
|
+
status=200,
|
|
282
|
+
json=self._get_expected_tag_ref("release/1.0", "SHA"),
|
|
283
|
+
)
|
|
284
|
+
rsps.add(
|
|
285
|
+
method=responses.GET,
|
|
286
|
+
url=self.repo_api_url + "/git/tags/SHA",
|
|
287
|
+
json=self._get_expected_tag(
|
|
288
|
+
"release/1.0", "SHA", message="PreRelease Message"
|
|
289
|
+
),
|
|
290
|
+
status=200,
|
|
291
|
+
)
|
|
292
|
+
rsps.add(
|
|
293
|
+
responses.GET,
|
|
294
|
+
self.repo_api_url + "/releases/tags/beta/1.0-Beta_1",
|
|
295
|
+
json=self._get_expected_release("release/1.0"),
|
|
296
|
+
status=200,
|
|
297
|
+
)
|
|
298
|
+
rsps.add(
|
|
299
|
+
responses.GET,
|
|
300
|
+
self.public_repo_url + "/git/ref/tags/beta/1.0-Beta_1",
|
|
301
|
+
status=404,
|
|
302
|
+
)
|
|
303
|
+
rsps.add(
|
|
304
|
+
responses.POST,
|
|
305
|
+
self.public_repo_url + "/git/tags",
|
|
306
|
+
json=self._get_expected_tag(
|
|
307
|
+
"beta/1.0-Beta_1", "21e04cfe480f5293e2f7103eee8a5cbdb94f7982"
|
|
308
|
+
),
|
|
309
|
+
status=201,
|
|
310
|
+
)
|
|
311
|
+
rsps.add(
|
|
312
|
+
responses.POST, self.public_repo_url + "/git/refs", json={}, status=201
|
|
313
|
+
)
|
|
314
|
+
rsps.add(
|
|
315
|
+
responses.POST,
|
|
316
|
+
self.public_repo_url + "/releases",
|
|
317
|
+
json=self._get_expected_release("beta/1.0-Beta_1"),
|
|
318
|
+
)
|
|
319
|
+
task_config = TaskConfig(
|
|
320
|
+
{
|
|
321
|
+
"options": {
|
|
322
|
+
"branch": "main",
|
|
323
|
+
"version": "latest_beta",
|
|
324
|
+
"create_release": True,
|
|
325
|
+
"repo_url": self.public_repo_url,
|
|
326
|
+
"includes": ["tasks/foo.py", "unpackaged/pre/foo/package.xml"],
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
)
|
|
330
|
+
extract_github.return_value.namelist.return_value = [
|
|
331
|
+
"tasks/foo.py",
|
|
332
|
+
"unpackaged/pre/foo/package.xml",
|
|
333
|
+
"force-app",
|
|
334
|
+
]
|
|
335
|
+
|
|
336
|
+
task = PublishSubtree(self.project_config, task_config)
|
|
337
|
+
task()
|
|
338
|
+
|
|
339
|
+
expected_release_body = json.dumps(
|
|
340
|
+
{
|
|
341
|
+
"tag_name": "beta/1.0-Beta_1",
|
|
342
|
+
"name": "1.0 (Beta 1)",
|
|
343
|
+
"body": "",
|
|
344
|
+
"draft": False,
|
|
345
|
+
"prerelease": False,
|
|
346
|
+
}
|
|
347
|
+
)
|
|
348
|
+
create_release_call = rsps.calls[9]
|
|
349
|
+
assert create_release_call.request.url == self.public_repo_url + "/releases"
|
|
350
|
+
assert create_release_call.request.method == responses.POST
|
|
351
|
+
assert create_release_call.request.body == expected_release_body
|
|
352
|
+
|
|
353
|
+
@responses.activate
|
|
354
|
+
@mock.patch("cumulusci.tasks.vcs.publish.download_extract_vcs_from_repo")
|
|
355
|
+
@mock.patch("cumulusci.vcs.github.service.CommitDir")
|
|
356
|
+
def test_ref_not_found(self, commit_dir, extract_github):
|
|
357
|
+
responses.add(
|
|
358
|
+
method=responses.GET,
|
|
359
|
+
url=self.repo_api_url,
|
|
360
|
+
json=self._get_expected_repo(owner=self.repo_owner, name=self.repo_name),
|
|
361
|
+
)
|
|
362
|
+
responses.add(
|
|
363
|
+
method=responses.GET,
|
|
364
|
+
url=self.public_repo_url,
|
|
365
|
+
json=self._get_expected_repo(
|
|
366
|
+
owner=self.public_owner, name=self.public_name
|
|
367
|
+
),
|
|
368
|
+
)
|
|
369
|
+
responses.add(
|
|
370
|
+
responses.GET,
|
|
371
|
+
self.repo_api_url + "/releases/latest",
|
|
372
|
+
json=self._get_expected_release("release/1.0"),
|
|
373
|
+
)
|
|
374
|
+
responses.add(
|
|
375
|
+
method=responses.GET,
|
|
376
|
+
url=self.repo_api_url + "/git/ref/tags/release/1.0",
|
|
377
|
+
status=404,
|
|
378
|
+
)
|
|
379
|
+
task_config = TaskConfig(
|
|
380
|
+
{
|
|
381
|
+
"options": {
|
|
382
|
+
"branch": "main",
|
|
383
|
+
"tag_name": "release/1.0",
|
|
384
|
+
"create_release": True,
|
|
385
|
+
"repo_url": self.public_repo_url,
|
|
386
|
+
"includes": ["tasks/foo.py", "unpackaged/pre/foo/package.xml"],
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
)
|
|
390
|
+
extract_github.return_value.namelist.return_value = [
|
|
391
|
+
"tasks/foo.py",
|
|
392
|
+
"unpackaged/pre/foo/package.xml",
|
|
393
|
+
"force-app",
|
|
394
|
+
]
|
|
395
|
+
task = PublishSubtree(self.project_config, task_config)
|
|
396
|
+
with pytest.raises(GithubApiNotFoundError) as exc:
|
|
397
|
+
task()
|
|
398
|
+
assert "Could not find reference for 'tags/release/1.0' on GitHub" == str(
|
|
399
|
+
exc.value
|
|
400
|
+
)
|
|
401
|
+
|
|
402
|
+
@responses.activate
|
|
403
|
+
@mock.patch("cumulusci.tasks.vcs.publish.download_extract_vcs_from_repo")
|
|
404
|
+
@mock.patch("cumulusci.vcs.github.service.CommitDir")
|
|
405
|
+
def test_tag_not_found(self, commit_dir, extract_github):
|
|
406
|
+
responses.add(
|
|
407
|
+
method=responses.GET,
|
|
408
|
+
url=self.repo_api_url,
|
|
409
|
+
json=self._get_expected_repo(owner=self.repo_owner, name=self.repo_name),
|
|
410
|
+
)
|
|
411
|
+
responses.add(
|
|
412
|
+
responses.GET,
|
|
413
|
+
self.repo_api_url + "/releases/latest",
|
|
414
|
+
json=self._get_expected_release("release/1.0"),
|
|
415
|
+
)
|
|
416
|
+
responses.add(
|
|
417
|
+
method=responses.GET,
|
|
418
|
+
url=self.public_repo_url,
|
|
419
|
+
json=self._get_expected_repo(
|
|
420
|
+
owner=self.public_owner, name=self.public_name
|
|
421
|
+
),
|
|
422
|
+
)
|
|
423
|
+
responses.add(
|
|
424
|
+
method=responses.GET,
|
|
425
|
+
url=self.repo_api_url + "/git/ref/tags/release/1.0",
|
|
426
|
+
status=201,
|
|
427
|
+
json=self._get_expected_tag_ref("release/1.0", "REF_SHA"),
|
|
428
|
+
)
|
|
429
|
+
responses.add(
|
|
430
|
+
responses.GET,
|
|
431
|
+
self.public_repo_url + "/releases/tags/release/1.0",
|
|
432
|
+
json=self._get_expected_release("release/1.0"),
|
|
433
|
+
)
|
|
434
|
+
responses.add(
|
|
435
|
+
method=responses.GET,
|
|
436
|
+
url=self.repo_api_url + "/git/tags/REF_SHA",
|
|
437
|
+
status=404,
|
|
438
|
+
)
|
|
439
|
+
task_config = TaskConfig(
|
|
440
|
+
{
|
|
441
|
+
"options": {
|
|
442
|
+
"branch": "main",
|
|
443
|
+
"tag_name": "release/1.0",
|
|
444
|
+
"create_release": True,
|
|
445
|
+
"repo_url": self.public_repo_url,
|
|
446
|
+
"includes": ["tasks/foo.py", "unpackaged/pre/foo/package.xml"],
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
)
|
|
450
|
+
extract_github.return_value.namelist.return_value = [
|
|
451
|
+
"tasks/foo.py",
|
|
452
|
+
"unpackaged/pre/foo/package.xml",
|
|
453
|
+
"force-app",
|
|
454
|
+
]
|
|
455
|
+
task = PublishSubtree(self.project_config, task_config)
|
|
456
|
+
with pytest.raises(GithubApiNotFoundError) as exc:
|
|
457
|
+
task()
|
|
458
|
+
assert "Could not find tag 'release/1.0' with SHA REF_SHA" in str(exc.value)
|
|
459
|
+
|
|
460
|
+
@responses.activate
|
|
461
|
+
@mock.patch("cumulusci.tasks.vcs.publish.download_extract_vcs_from_repo")
|
|
462
|
+
@mock.patch("cumulusci.vcs.github.service.CommitDir")
|
|
463
|
+
def test_release_not_found(self, commit_dir, extract_github):
|
|
464
|
+
responses.add(
|
|
465
|
+
method=responses.GET,
|
|
466
|
+
url=self.repo_api_url,
|
|
467
|
+
json=self._get_expected_repo(owner=self.repo_owner, name=self.repo_name),
|
|
468
|
+
)
|
|
469
|
+
responses.add(
|
|
470
|
+
responses.GET,
|
|
471
|
+
self.repo_api_url + "/releases/latest",
|
|
472
|
+
json=self._get_expected_release("release/1.0"),
|
|
473
|
+
)
|
|
474
|
+
responses.add(
|
|
475
|
+
method=responses.GET,
|
|
476
|
+
url=self.public_repo_url,
|
|
477
|
+
json=self._get_expected_repo(
|
|
478
|
+
owner=self.public_owner, name=self.public_name
|
|
479
|
+
),
|
|
480
|
+
)
|
|
481
|
+
responses.add(
|
|
482
|
+
method=responses.GET,
|
|
483
|
+
url=self.repo_api_url + "/git/ref/tags/release/1.0",
|
|
484
|
+
status=200,
|
|
485
|
+
json=self._get_expected_tag_ref("release/1.0", "SHA"),
|
|
486
|
+
)
|
|
487
|
+
responses.add(
|
|
488
|
+
method=responses.GET,
|
|
489
|
+
url=self.repo_api_url + "/git/tags/SHA",
|
|
490
|
+
json=self._get_expected_tag("release/1.0", "SHA"),
|
|
491
|
+
status=200,
|
|
492
|
+
)
|
|
493
|
+
responses.add(
|
|
494
|
+
responses.GET, self.repo_api_url + "/releases/tags/release/1.0", status=404
|
|
495
|
+
)
|
|
496
|
+
task_config = TaskConfig(
|
|
497
|
+
{
|
|
498
|
+
"options": {
|
|
499
|
+
"branch": "master",
|
|
500
|
+
"tag_name": "release/1.0",
|
|
501
|
+
"create_release": True,
|
|
502
|
+
"repo_url": self.public_repo_url,
|
|
503
|
+
"includes": ["tasks/foo.py", "unpackaged/pre/foo/package.xml"],
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
)
|
|
507
|
+
extract_github.return_value.namelist.return_value = [
|
|
508
|
+
"tasks/foo.py",
|
|
509
|
+
"unpackaged/pre/foo/package.xml",
|
|
510
|
+
"force-app",
|
|
511
|
+
]
|
|
512
|
+
task = PublishSubtree(self.project_config, task_config)
|
|
513
|
+
with pytest.raises(GithubApiNotFoundError) as exc:
|
|
514
|
+
task()
|
|
515
|
+
assert str(exc.value) == "Release for release/1.0 not found"
|
|
516
|
+
|
|
517
|
+
@responses.activate
|
|
518
|
+
@mock.patch("cumulusci.tasks.vcs.publish.download_extract_vcs_from_repo")
|
|
519
|
+
@mock.patch("cumulusci.vcs.github.service.CommitDir")
|
|
520
|
+
def test_target_release_exists(self, commit_dir, extract_github):
|
|
521
|
+
responses.add(
|
|
522
|
+
method=responses.GET,
|
|
523
|
+
url=self.repo_api_url,
|
|
524
|
+
json=self._get_expected_repo(owner=self.repo_owner, name=self.repo_name),
|
|
525
|
+
)
|
|
526
|
+
responses.add(
|
|
527
|
+
responses.GET,
|
|
528
|
+
self.repo_api_url + "/releases/latest",
|
|
529
|
+
json=self._get_expected_release("release/1.0"),
|
|
530
|
+
)
|
|
531
|
+
responses.add(
|
|
532
|
+
method=responses.GET,
|
|
533
|
+
url=self.public_repo_url,
|
|
534
|
+
json=self._get_expected_repo(
|
|
535
|
+
owner=self.public_owner, name=self.public_name
|
|
536
|
+
),
|
|
537
|
+
)
|
|
538
|
+
responses.add(
|
|
539
|
+
method=responses.GET,
|
|
540
|
+
url=self.public_repo_url + "/git/ref/tags/release/1.0",
|
|
541
|
+
status=201,
|
|
542
|
+
json=self._get_expected_tag_ref("release/1.0", "SHA"),
|
|
543
|
+
)
|
|
544
|
+
responses.add(
|
|
545
|
+
method=responses.GET,
|
|
546
|
+
url=self.repo_api_url + "/git/ref/tags/release/1.0",
|
|
547
|
+
status=201,
|
|
548
|
+
json=self._get_expected_tag_ref("release/1.0", "SHA"),
|
|
549
|
+
)
|
|
550
|
+
responses.add(
|
|
551
|
+
method=responses.GET,
|
|
552
|
+
url=self.repo_api_url + "/git/tags/SHA",
|
|
553
|
+
json=self._get_expected_tag("release/1.0", "SHA"),
|
|
554
|
+
status=201,
|
|
555
|
+
)
|
|
556
|
+
responses.add(
|
|
557
|
+
responses.GET,
|
|
558
|
+
self.repo_api_url + "/releases/tags/release/1.0",
|
|
559
|
+
json=self._get_expected_release("release/1.0"),
|
|
560
|
+
)
|
|
561
|
+
responses.add(
|
|
562
|
+
responses.GET,
|
|
563
|
+
self.public_repo_url + "/releases/tags/release/1.0",
|
|
564
|
+
json=self._get_expected_release("release/1.0"),
|
|
565
|
+
)
|
|
566
|
+
task_config = TaskConfig(
|
|
567
|
+
{
|
|
568
|
+
"options": {
|
|
569
|
+
"branch": "master",
|
|
570
|
+
"tag_name": "release/1.0",
|
|
571
|
+
"create_release": True,
|
|
572
|
+
"repo_url": self.public_repo_url,
|
|
573
|
+
"includes": ["tasks/foo.py", "unpackaged/pre/foo/package.xml"],
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
)
|
|
577
|
+
extract_github.return_value.namelist.return_value = [
|
|
578
|
+
"tasks/foo.py",
|
|
579
|
+
"unpackaged/pre/foo/package.xml",
|
|
580
|
+
"force-app",
|
|
581
|
+
]
|
|
582
|
+
task = PublishSubtree(self.project_config, task_config)
|
|
583
|
+
with pytest.raises(VcsException) as exc:
|
|
584
|
+
task()
|
|
585
|
+
assert str(exc.value) == "Ref for tag release/1.0 already exists in target repo"
|
|
586
|
+
|
|
587
|
+
def test_ref_nor_tag_name_error(self):
|
|
588
|
+
task_config = TaskConfig(
|
|
589
|
+
{
|
|
590
|
+
"options": {
|
|
591
|
+
"branch": "master",
|
|
592
|
+
"repo_url": self.public_repo_url,
|
|
593
|
+
"includes": ["tasks/foo.py", "unpackaged/pre/foo/package.xml"],
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
)
|
|
597
|
+
with pytest.raises(TaskOptionsError) as exc:
|
|
598
|
+
PublishSubtree(self.project_config, task_config)
|
|
599
|
+
assert str(exc.value) == "Either `ref` or `tag_name` option is required."
|
|
600
|
+
|
|
601
|
+
def test_renames_not_list_error(self):
|
|
602
|
+
task_config = TaskConfig(
|
|
603
|
+
{
|
|
604
|
+
"options": {
|
|
605
|
+
"branch": "master",
|
|
606
|
+
"repo_url": self.public_repo_url,
|
|
607
|
+
"includes": ["tasks/foo.py", "unpackaged/pre/foo/package.xml"],
|
|
608
|
+
"renames": ["tasks/foo.py", "unpackaged/pre/foo/package.xml"],
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
)
|
|
612
|
+
with pytest.raises(TaskOptionsError) as exc:
|
|
613
|
+
PublishSubtree(self.project_config, task_config)
|
|
614
|
+
assert (
|
|
615
|
+
"Renamed paths must be a list of dicts with `local:` and `target:` keys."
|
|
616
|
+
== str(exc.value)
|
|
617
|
+
)
|
|
618
|
+
|
|
619
|
+
def test_renames_wrong_keys_error(self):
|
|
620
|
+
task_config = TaskConfig(
|
|
621
|
+
{
|
|
622
|
+
"options": {
|
|
623
|
+
"branch": "master",
|
|
624
|
+
"repo_url": self.public_repo_url,
|
|
625
|
+
"includes": ["tasks/foo.py", "unpackaged/pre/foo/package.xml"],
|
|
626
|
+
"renames": [
|
|
627
|
+
{
|
|
628
|
+
"wrong_key": "tasks/foo.py",
|
|
629
|
+
"target": "unpackaged/pre/foo/package.xml",
|
|
630
|
+
}
|
|
631
|
+
],
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
)
|
|
635
|
+
with pytest.raises(TaskOptionsError) as exc:
|
|
636
|
+
PublishSubtree(self.project_config, task_config)
|
|
637
|
+
assert (
|
|
638
|
+
"Renamed paths must be a list of dicts with `local:` and `target:` keys."
|
|
639
|
+
== str(exc.value)
|
|
640
|
+
)
|
|
641
|
+
|
|
642
|
+
def test_renames_bad_value_error(self):
|
|
643
|
+
task_config = TaskConfig(
|
|
644
|
+
{
|
|
645
|
+
"options": {
|
|
646
|
+
"branch": "master",
|
|
647
|
+
"repo_url": self.public_repo_url,
|
|
648
|
+
"create_release": True,
|
|
649
|
+
"includes": ["tasks/foo.py", "unpackaged/pre/foo/package.xml"],
|
|
650
|
+
"renames": [
|
|
651
|
+
{
|
|
652
|
+
"local": "public/target_readme.md",
|
|
653
|
+
"target": "",
|
|
654
|
+
}
|
|
655
|
+
],
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
)
|
|
659
|
+
with pytest.raises(TaskOptionsError) as exc:
|
|
660
|
+
PublishSubtree(self.project_config, task_config)
|
|
661
|
+
assert (
|
|
662
|
+
"Renamed paths must be a list of dicts with `local:` and `target:` keys."
|
|
663
|
+
== str(exc.value)
|
|
664
|
+
)
|
|
665
|
+
|
|
666
|
+
def test_path_renames_option(self):
|
|
667
|
+
test_includes = [
|
|
668
|
+
"scripts/anon.cls",
|
|
669
|
+
"scripts/more_anon.cls",
|
|
670
|
+
"tasks/unmoved.py",
|
|
671
|
+
"tasks/move_me.py",
|
|
672
|
+
"public/public_readme.md",
|
|
673
|
+
]
|
|
674
|
+
test_renames = [
|
|
675
|
+
{"local": "scripts", "target": "apex"},
|
|
676
|
+
{"local": "tasks/move_me.py", "target": "sample_tasks/was_moved.py"},
|
|
677
|
+
{"local": "public/public_readme.md", "target": "README.md"},
|
|
678
|
+
{"local": "missing_path", "target": "should_not_exist"},
|
|
679
|
+
]
|
|
680
|
+
task_config = TaskConfig(
|
|
681
|
+
{
|
|
682
|
+
"options": {
|
|
683
|
+
"branch": "master",
|
|
684
|
+
"ref": "some-branch-name",
|
|
685
|
+
"repo_url": self.public_repo_url,
|
|
686
|
+
"include": test_includes,
|
|
687
|
+
"renames": test_renames,
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
)
|
|
691
|
+
task = PublishSubtree(self.project_config, task_config)
|
|
692
|
+
with tempfile.TemporaryDirectory() as target:
|
|
693
|
+
included_paths = [Path(target, local_name) for local_name in test_includes]
|
|
694
|
+
[
|
|
695
|
+
include.parent.mkdir(parents=True, exist_ok=True)
|
|
696
|
+
for include in included_paths
|
|
697
|
+
]
|
|
698
|
+
|
|
699
|
+
assert all([include.write_text("12345") == 5 for include in included_paths])
|
|
700
|
+
assert all([include.exists() for include in included_paths])
|
|
701
|
+
|
|
702
|
+
# Renames without a local shouldn't exist
|
|
703
|
+
missing_rename = test_renames.pop()
|
|
704
|
+
missing_local = Path(target, missing_rename["local"])
|
|
705
|
+
assert missing_local not in included_paths
|
|
706
|
+
|
|
707
|
+
task._rename_files(target)
|
|
708
|
+
|
|
709
|
+
assert not Path(target, missing_rename["target"]).exists()
|
|
710
|
+
unmoved_path = Path(target, "tasks/unmoved.py")
|
|
711
|
+
assert unmoved_path.exists()
|
|
712
|
+
|
|
713
|
+
# All of the paths with renames should be gone
|
|
714
|
+
included_paths.remove(unmoved_path)
|
|
715
|
+
assert all([not include.exists() for include in included_paths])
|
|
716
|
+
|
|
717
|
+
# All of the renamed paths should exist
|
|
718
|
+
new_paths = [Path(target, rename["target"]) for rename in test_renames]
|
|
719
|
+
assert all([rename.exists() for rename in new_paths])
|
|
720
|
+
|
|
721
|
+
# Directory renames should work
|
|
722
|
+
assert Path(target, "apex/anon.cls").exists()
|
|
723
|
+
assert Path(target, "apex/more_anon.cls").exists()
|
|
724
|
+
|
|
725
|
+
@mock.patch("cumulusci.tasks.vcs.publish.download_extract_vcs_from_repo")
|
|
726
|
+
@mock.patch("cumulusci.vcs.github.service.CommitDir.__call__")
|
|
727
|
+
def test_run_task_ref(self, commit_dir, extract_github):
|
|
728
|
+
commit_dir.return_value = "Published content from ref feature/publish"
|
|
729
|
+
with responses.RequestsMock() as rsps:
|
|
730
|
+
rsps.add(
|
|
731
|
+
method=responses.GET,
|
|
732
|
+
url=self.repo_api_url,
|
|
733
|
+
json=self._get_expected_repo(
|
|
734
|
+
owner=self.repo_owner, name=self.repo_name
|
|
735
|
+
),
|
|
736
|
+
)
|
|
737
|
+
rsps.add(
|
|
738
|
+
method=responses.GET,
|
|
739
|
+
url=self.public_repo_url,
|
|
740
|
+
json=self._get_expected_repo(
|
|
741
|
+
owner=self.public_owner, name=self.public_name
|
|
742
|
+
),
|
|
743
|
+
)
|
|
744
|
+
task_config = TaskConfig(
|
|
745
|
+
{
|
|
746
|
+
"options": {
|
|
747
|
+
"branch": "master",
|
|
748
|
+
"ref": "feature/publish",
|
|
749
|
+
"create_release": False,
|
|
750
|
+
"repo_url": self.public_repo_url,
|
|
751
|
+
"includes": ["tasks/foo.py", "unpackaged/pre/foo/package.xml"],
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
)
|
|
755
|
+
extract_github.return_value.namelist.return_value = [
|
|
756
|
+
"tasks/foo.py",
|
|
757
|
+
"unpackaged/pre/foo/package.xml",
|
|
758
|
+
"force-app",
|
|
759
|
+
]
|
|
760
|
+
|
|
761
|
+
task = PublishSubtree(self.project_config, task_config)
|
|
762
|
+
task()
|
|
763
|
+
|
|
764
|
+
extract_github.assert_called_once()
|
|
765
|
+
assert extract_github.call_args[1]["ref"] == "feature/publish"
|
|
766
|
+
commit_dir.assert_called_once()
|
|
767
|
+
expected_commit_message = "Published content from ref feature/publish"
|
|
768
|
+
assert commit_dir.call_args[1]["commit_message"] == expected_commit_message
|
|
769
|
+
|
|
770
|
+
def test_included_dirs_match(self):
|
|
771
|
+
from cumulusci.utils import filter_namelist
|
|
772
|
+
|
|
773
|
+
test_includes = [
|
|
774
|
+
"orgs/",
|
|
775
|
+
"public/public_readme.md",
|
|
776
|
+
"scripts/anon.cls",
|
|
777
|
+
"scripts/public",
|
|
778
|
+
"tasks/move_me.py",
|
|
779
|
+
]
|
|
780
|
+
test_namelist = [
|
|
781
|
+
"orgs/",
|
|
782
|
+
"orgs/dev.json",
|
|
783
|
+
"orgs/feature.json",
|
|
784
|
+
"orgs/prerelease.json",
|
|
785
|
+
"orgs/release.json",
|
|
786
|
+
"orgs/trial.json",
|
|
787
|
+
"public/public_readme.md",
|
|
788
|
+
"scripts/",
|
|
789
|
+
"scripts/anon.cls",
|
|
790
|
+
"scripts/more_anon.cls",
|
|
791
|
+
"scripts/public/",
|
|
792
|
+
"scripts/public/anon.cls",
|
|
793
|
+
"scripts/public_to_global.cls",
|
|
794
|
+
"tasks/",
|
|
795
|
+
"tasks/move_me.py",
|
|
796
|
+
"tasks/unmoved.py",
|
|
797
|
+
]
|
|
798
|
+
task_config = TaskConfig(
|
|
799
|
+
{
|
|
800
|
+
"options": {
|
|
801
|
+
"branch": "master",
|
|
802
|
+
"ref": "some-branch-name",
|
|
803
|
+
"repo_url": self.public_repo_url,
|
|
804
|
+
"include": test_includes,
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
)
|
|
808
|
+
task = PublishSubtree(self.project_config, task_config)
|
|
809
|
+
expected_namelist = [
|
|
810
|
+
"orgs/",
|
|
811
|
+
"orgs/dev.json",
|
|
812
|
+
"orgs/feature.json",
|
|
813
|
+
"orgs/prerelease.json",
|
|
814
|
+
"orgs/release.json",
|
|
815
|
+
"orgs/trial.json",
|
|
816
|
+
"public/public_readme.md",
|
|
817
|
+
"scripts/anon.cls",
|
|
818
|
+
"scripts/public/",
|
|
819
|
+
"scripts/public/anon.cls",
|
|
820
|
+
"tasks/move_me.py",
|
|
821
|
+
]
|
|
822
|
+
actual_namelist = filter_namelist(task.options["include"], test_namelist)
|
|
823
|
+
assert sorted(expected_namelist) == sorted(actual_namelist)
|