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,1091 @@
|
|
|
1
|
+
import io
|
|
2
|
+
import os
|
|
3
|
+
import typing as T
|
|
4
|
+
import zipfile
|
|
5
|
+
from pathlib import Path, PurePosixPath
|
|
6
|
+
from unittest import mock
|
|
7
|
+
from zipfile import ZipFile
|
|
8
|
+
|
|
9
|
+
import pytest
|
|
10
|
+
from lxml import etree as ET
|
|
11
|
+
from pydantic import ValidationError
|
|
12
|
+
|
|
13
|
+
from cumulusci.core.exceptions import CumulusCIException, TaskOptionsError
|
|
14
|
+
from cumulusci.core.source_transforms.transforms import (
|
|
15
|
+
CleanMetaXMLTransform,
|
|
16
|
+
FindReplaceIdAPI,
|
|
17
|
+
FindReplaceTransform,
|
|
18
|
+
FindReplaceTransformOptions,
|
|
19
|
+
NamespaceInjectionTransform,
|
|
20
|
+
RemoveFeatureParametersTransform,
|
|
21
|
+
SourceTransformList,
|
|
22
|
+
SourceTransformSpec,
|
|
23
|
+
StripUnwantedComponentsOptions,
|
|
24
|
+
StripUnwantedComponentTransform,
|
|
25
|
+
)
|
|
26
|
+
from cumulusci.salesforce_api.package_zip import MetadataPackageZipBuilder
|
|
27
|
+
from cumulusci.utils import temporary_dir
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class ZipFileSpec:
|
|
31
|
+
content: T.Dict[Path, T.Union[str, bytes, "ZipFileSpec"]]
|
|
32
|
+
|
|
33
|
+
def __init__(self, content: T.Dict[Path, T.Union[str, bytes, "ZipFileSpec"]]):
|
|
34
|
+
self.content = content
|
|
35
|
+
|
|
36
|
+
def as_zipfile(self) -> ZipFile:
|
|
37
|
+
zip_dest = ZipFile(io.BytesIO(), "w", zipfile.ZIP_DEFLATED)
|
|
38
|
+
for path, content in self.content.items():
|
|
39
|
+
if isinstance(content, ZipFileSpec):
|
|
40
|
+
raise Exception("Generating nested zipfiles is not supported")
|
|
41
|
+
zip_dest.writestr(str(path), content)
|
|
42
|
+
|
|
43
|
+
# Zipfile must be returned in open state to be used by MetadataPackageZipBuilder
|
|
44
|
+
return zip_dest
|
|
45
|
+
|
|
46
|
+
def __eq__(self, other):
|
|
47
|
+
# When we write zipfiles, Windows paths are normalized to POSIX paths.
|
|
48
|
+
# But when we read, we must construct and supply the POSIX path -
|
|
49
|
+
# Windows-style paths _aren't_ normalized on read.
|
|
50
|
+
|
|
51
|
+
if isinstance(other, ZipFileSpec):
|
|
52
|
+
return other.content == self.content
|
|
53
|
+
elif isinstance(other, ZipFile):
|
|
54
|
+
fp = other.fp
|
|
55
|
+
other.close()
|
|
56
|
+
other = ZipFile(fp, "r") # type: ignore
|
|
57
|
+
|
|
58
|
+
def element_equal(this, other):
|
|
59
|
+
if isinstance(this, ZipFileSpec):
|
|
60
|
+
outcome = this == ZipFile(
|
|
61
|
+
io.BytesIO(other), "r", zipfile.ZIP_DEFLATED
|
|
62
|
+
)
|
|
63
|
+
elif isinstance(this, str):
|
|
64
|
+
outcome = this.encode("utf-8").replace(
|
|
65
|
+
b"\r\n", b"\n"
|
|
66
|
+
) == other.replace(
|
|
67
|
+
b"\r\n", b"\n"
|
|
68
|
+
) # Replacing windows new line characters with Unix new characters
|
|
69
|
+
else:
|
|
70
|
+
outcome = this == other
|
|
71
|
+
|
|
72
|
+
if not outcome:
|
|
73
|
+
print(f"Found zipfile members unequal: {this}, {other}")
|
|
74
|
+
return outcome
|
|
75
|
+
|
|
76
|
+
return set(other.namelist()) == set(
|
|
77
|
+
[str(PurePosixPath(s)) for s in self.content.keys()]
|
|
78
|
+
) and all(
|
|
79
|
+
element_equal(self.content[name], other.read(str(PurePosixPath(name))))
|
|
80
|
+
for name in self.content.keys()
|
|
81
|
+
)
|
|
82
|
+
else:
|
|
83
|
+
return False
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def test_namespace_inject(task_context):
|
|
87
|
+
builder = MetadataPackageZipBuilder.from_zipfile(
|
|
88
|
+
ZipFileSpec(
|
|
89
|
+
{
|
|
90
|
+
Path(
|
|
91
|
+
"___NAMESPACE___Foo.cls"
|
|
92
|
+
): "System.debug('%%%NAMESPACE%%%blah%%%NAMESPACED_ORG%%%');"
|
|
93
|
+
}
|
|
94
|
+
).as_zipfile(),
|
|
95
|
+
options={"namespace_inject": "ns", "unmanaged": False},
|
|
96
|
+
context=task_context,
|
|
97
|
+
)
|
|
98
|
+
assert ZipFileSpec({Path("ns__Foo.cls"): "System.debug('ns__blah');"}) == builder.zf
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def test_namespace_inject__unmanaged(task_context):
|
|
102
|
+
builder = MetadataPackageZipBuilder.from_zipfile(
|
|
103
|
+
ZipFileSpec(
|
|
104
|
+
{Path("___NAMESPACE___Foo.cls"): "System.debug('%%%NAMESPACE%%%blah');"}
|
|
105
|
+
).as_zipfile(),
|
|
106
|
+
options={"namespace_inject": "ns"},
|
|
107
|
+
context=task_context,
|
|
108
|
+
)
|
|
109
|
+
assert ZipFileSpec({Path("Foo.cls"): "System.debug('blah');"}) == builder.zf
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def test_namespace_inject__namespaced_org(task_context):
|
|
113
|
+
builder = MetadataPackageZipBuilder.from_zipfile(
|
|
114
|
+
ZipFileSpec(
|
|
115
|
+
{
|
|
116
|
+
Path(
|
|
117
|
+
"___NAMESPACE___Foo.cls"
|
|
118
|
+
): "System.debug('%%%NAMESPACED_ORG%%%blah');"
|
|
119
|
+
}
|
|
120
|
+
).as_zipfile(),
|
|
121
|
+
options={"namespace_inject": "ns", "namespaced_org": True},
|
|
122
|
+
context=task_context,
|
|
123
|
+
)
|
|
124
|
+
assert ZipFileSpec({Path("Foo.cls"): "System.debug('ns__blah');"}) == builder.zf
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
def test_namespace_strip(task_context):
|
|
128
|
+
builder = MetadataPackageZipBuilder.from_zipfile(
|
|
129
|
+
ZipFileSpec({Path("ns__Foo.cls"): "System.debug('ns__blah');"}).as_zipfile(),
|
|
130
|
+
options={"namespace_strip": "ns", "unmanaged": False},
|
|
131
|
+
context=task_context,
|
|
132
|
+
)
|
|
133
|
+
assert ZipFileSpec({Path("Foo.cls"): "System.debug('blah');"}) == builder.zf
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
def test_namespace_tokenize(task_context):
|
|
137
|
+
builder = MetadataPackageZipBuilder.from_zipfile(
|
|
138
|
+
ZipFileSpec({Path("ns__Foo.cls"): "System.debug('ns__blah');"}).as_zipfile(),
|
|
139
|
+
options={"namespace_tokenize": "ns", "unmanaged": False},
|
|
140
|
+
context=task_context,
|
|
141
|
+
)
|
|
142
|
+
assert (
|
|
143
|
+
ZipFileSpec(
|
|
144
|
+
{Path("___NAMESPACE___Foo.cls"): "System.debug('%%%NAMESPACE%%%blah');"}
|
|
145
|
+
)
|
|
146
|
+
== builder.zf
|
|
147
|
+
)
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
def test_namespace_injection_ignores_binary(task_context):
|
|
151
|
+
builder = MetadataPackageZipBuilder.from_zipfile(
|
|
152
|
+
ZipFileSpec(
|
|
153
|
+
{
|
|
154
|
+
Path("ns__Foo.cls"): "System.debug('ns__blah');",
|
|
155
|
+
Path("b.staticResource"): b"ns__\xFF\xFF",
|
|
156
|
+
}
|
|
157
|
+
).as_zipfile(),
|
|
158
|
+
options={"namespace_tokenize": "ns", "unmanaged": False},
|
|
159
|
+
context=task_context,
|
|
160
|
+
)
|
|
161
|
+
assert (
|
|
162
|
+
ZipFileSpec(
|
|
163
|
+
{
|
|
164
|
+
Path("___NAMESPACE___Foo.cls"): "System.debug('%%%NAMESPACE%%%blah');",
|
|
165
|
+
Path("b.staticResource"): b"ns__\xFF\xFF",
|
|
166
|
+
}
|
|
167
|
+
)
|
|
168
|
+
== builder.zf
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
def test_clean_meta_xml(task_context):
|
|
173
|
+
xml_data = """<?xml version="1.0" encoding="UTF-8"?>
|
|
174
|
+
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
175
|
+
<apiVersion>56.0</apiVersion>
|
|
176
|
+
<packageVersions>
|
|
177
|
+
<majorNumber>3</majorNumber>
|
|
178
|
+
<minorNumber>11</minorNumber>
|
|
179
|
+
<namespace>npe01</namespace>
|
|
180
|
+
</packageVersions>
|
|
181
|
+
</ApexClass>
|
|
182
|
+
"""
|
|
183
|
+
|
|
184
|
+
xml_data_clean = """<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
185
|
+
<apiVersion>56.0</apiVersion>
|
|
186
|
+
</ApexClass>"""
|
|
187
|
+
|
|
188
|
+
builder = MetadataPackageZipBuilder.from_zipfile(
|
|
189
|
+
ZipFileSpec({Path("classes/Foo.cls-meta.xml"): xml_data}).as_zipfile(),
|
|
190
|
+
context=task_context,
|
|
191
|
+
)
|
|
192
|
+
assert ZipFileSpec({Path("classes/Foo.cls-meta.xml"): xml_data_clean}) == builder.zf
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
def test_clean_meta_xml__inactive(task_context):
|
|
196
|
+
xml_data = """<?xml version="1.0" encoding="UTF-8"?>
|
|
197
|
+
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
198
|
+
<apiVersion>56.0</apiVersion>
|
|
199
|
+
<packageVersions>
|
|
200
|
+
<majorNumber>3</majorNumber>
|
|
201
|
+
<minorNumber>11</minorNumber>
|
|
202
|
+
<namespace>npe01</namespace>
|
|
203
|
+
</packageVersions>
|
|
204
|
+
</ApexClass>
|
|
205
|
+
"""
|
|
206
|
+
|
|
207
|
+
builder = MetadataPackageZipBuilder.from_zipfile(
|
|
208
|
+
ZipFileSpec({Path("classes") / "Foo.cls-meta.xml": xml_data}).as_zipfile(),
|
|
209
|
+
options={"clean_meta_xml": False},
|
|
210
|
+
context=task_context,
|
|
211
|
+
)
|
|
212
|
+
assert ZipFileSpec({Path("classes") / "Foo.cls-meta.xml": xml_data}) == builder.zf
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
def test_remove_feature_parameters(task_context):
|
|
216
|
+
xml_data = """<?xml version="1.0" encoding="UTF-8"?>
|
|
217
|
+
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
218
|
+
<fullName>TestPackage</fullName>
|
|
219
|
+
<types>
|
|
220
|
+
<members>MyClass</members>
|
|
221
|
+
<name>ApexClass</name>
|
|
222
|
+
</types>
|
|
223
|
+
<types>
|
|
224
|
+
<members>blah</members>
|
|
225
|
+
<name>FeatureParameterInteger</name>
|
|
226
|
+
</types>
|
|
227
|
+
<version>43.0</version>
|
|
228
|
+
</Package>"""
|
|
229
|
+
|
|
230
|
+
xml_data_clean = """<?xml version="1.0" encoding="UTF-8"?>
|
|
231
|
+
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
232
|
+
<fullName>TestPackage</fullName>
|
|
233
|
+
<types>
|
|
234
|
+
<members>MyClass</members>
|
|
235
|
+
<name>ApexClass</name>
|
|
236
|
+
</types>
|
|
237
|
+
<version>43.0</version>
|
|
238
|
+
</Package>
|
|
239
|
+
"""
|
|
240
|
+
|
|
241
|
+
builder = MetadataPackageZipBuilder.from_zipfile(
|
|
242
|
+
ZipFileSpec(
|
|
243
|
+
{
|
|
244
|
+
Path("featureParameters") / "blah.featureParameterInteger": "foo",
|
|
245
|
+
Path("package.xml"): xml_data,
|
|
246
|
+
Path("classes") / "MyClass.cls": "blah",
|
|
247
|
+
}
|
|
248
|
+
).as_zipfile(),
|
|
249
|
+
options={"package_type": "Unlocked"},
|
|
250
|
+
context=task_context,
|
|
251
|
+
)
|
|
252
|
+
assert (
|
|
253
|
+
ZipFileSpec(
|
|
254
|
+
{
|
|
255
|
+
Path("package.xml"): xml_data_clean,
|
|
256
|
+
Path("classes") / "MyClass.cls": "blah",
|
|
257
|
+
}
|
|
258
|
+
)
|
|
259
|
+
== builder.zf
|
|
260
|
+
)
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
def test_remove_feature_parameters__inactive(task_context):
|
|
264
|
+
xml_data = """<?xml version="1.0" encoding="UTF-8"?>
|
|
265
|
+
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
266
|
+
<fullName>TestPackage</fullName>
|
|
267
|
+
<types>
|
|
268
|
+
<members>MyClass</members>
|
|
269
|
+
<name>ApexClass</name>
|
|
270
|
+
</types>
|
|
271
|
+
<types>
|
|
272
|
+
<members>blah</members>
|
|
273
|
+
<name>FeatureParameterInteger</name>
|
|
274
|
+
</types>
|
|
275
|
+
<version>43.0</version>
|
|
276
|
+
</Package>"""
|
|
277
|
+
|
|
278
|
+
builder = MetadataPackageZipBuilder.from_zipfile(
|
|
279
|
+
ZipFileSpec(
|
|
280
|
+
{
|
|
281
|
+
Path("featureParameters") / "blah.featureParameterInteger": "foo",
|
|
282
|
+
Path("package.xml"): xml_data,
|
|
283
|
+
Path("classes") / "MyClass.cls": "blah",
|
|
284
|
+
}
|
|
285
|
+
).as_zipfile(),
|
|
286
|
+
context=task_context,
|
|
287
|
+
)
|
|
288
|
+
assert (
|
|
289
|
+
ZipFileSpec(
|
|
290
|
+
{
|
|
291
|
+
Path("featureParameters") / "blah.featureParameterInteger": "foo",
|
|
292
|
+
Path("package.xml"): xml_data,
|
|
293
|
+
Path("classes") / "MyClass.cls": "blah",
|
|
294
|
+
}
|
|
295
|
+
)
|
|
296
|
+
== builder.zf
|
|
297
|
+
)
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
def test_bundle_static_resources(task_context):
|
|
301
|
+
xml_data = """<?xml version="1.0" encoding="UTF-8"?>
|
|
302
|
+
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
303
|
+
<fullName>TestPackage</fullName>
|
|
304
|
+
<types>
|
|
305
|
+
<members>MyClass</members>
|
|
306
|
+
<name>ApexClass</name>
|
|
307
|
+
</types>
|
|
308
|
+
<version>43.0</version>
|
|
309
|
+
</Package>
|
|
310
|
+
"""
|
|
311
|
+
|
|
312
|
+
xml_data_with_statics = """<?xml version="1.0" encoding="UTF-8"?>
|
|
313
|
+
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
314
|
+
<fullName>TestPackage</fullName>
|
|
315
|
+
<types>
|
|
316
|
+
<members>MyClass</members>
|
|
317
|
+
<name>ApexClass</name>
|
|
318
|
+
</types>
|
|
319
|
+
<types>
|
|
320
|
+
<members>bar</members>
|
|
321
|
+
<members>foo</members>
|
|
322
|
+
<name>StaticResource</name>
|
|
323
|
+
</types>
|
|
324
|
+
<version>43.0</version>
|
|
325
|
+
</Package>
|
|
326
|
+
"""
|
|
327
|
+
|
|
328
|
+
with temporary_dir() as td_path:
|
|
329
|
+
# Construct a directory with zippable Static Resource data
|
|
330
|
+
# Because of how the static resource bundling works, this needs
|
|
331
|
+
# to be a real filesystem directory.
|
|
332
|
+
|
|
333
|
+
td = Path(td_path)
|
|
334
|
+
|
|
335
|
+
statics_dir = td / "statics"
|
|
336
|
+
statics_dir.mkdir()
|
|
337
|
+
(statics_dir / "foo.resource-meta.xml").write_text("foo")
|
|
338
|
+
(statics_dir / "bar.resource-meta.xml").write_text("bar")
|
|
339
|
+
(statics_dir / "foo").mkdir()
|
|
340
|
+
(statics_dir / "foo" / "foo.html").write_text("foo html")
|
|
341
|
+
(statics_dir / "bar").mkdir()
|
|
342
|
+
(statics_dir / "bar" / "bar.html").write_text("bar html")
|
|
343
|
+
|
|
344
|
+
builder = MetadataPackageZipBuilder.from_zipfile(
|
|
345
|
+
ZipFileSpec(
|
|
346
|
+
{
|
|
347
|
+
Path("package.xml"): xml_data,
|
|
348
|
+
Path("classes") / "MyClass.cls": "blah",
|
|
349
|
+
}
|
|
350
|
+
).as_zipfile(),
|
|
351
|
+
options={"static_resource_path": str(statics_dir)},
|
|
352
|
+
context=task_context,
|
|
353
|
+
)
|
|
354
|
+
|
|
355
|
+
foo_spec = ZipFileSpec(
|
|
356
|
+
{
|
|
357
|
+
Path("foo.html"): "foo html",
|
|
358
|
+
}
|
|
359
|
+
)
|
|
360
|
+
bar_spec = ZipFileSpec({Path("bar.html"): "bar html"})
|
|
361
|
+
compare_spec = ZipFileSpec(
|
|
362
|
+
{
|
|
363
|
+
Path("staticresources") / "foo.resource": foo_spec,
|
|
364
|
+
Path("staticresources") / "foo.resource-meta.xml": "foo",
|
|
365
|
+
Path("staticresources") / "bar.resource": bar_spec,
|
|
366
|
+
Path("staticresources") / "bar.resource-meta.xml": "bar",
|
|
367
|
+
Path("package.xml"): xml_data_with_statics,
|
|
368
|
+
Path("classes") / "MyClass.cls": "blah",
|
|
369
|
+
}
|
|
370
|
+
)
|
|
371
|
+
|
|
372
|
+
# Close and reopen the zipfile to avoid issues on Windows.
|
|
373
|
+
fp = builder.zf.fp # type: ignore
|
|
374
|
+
builder.zf.close() # type: ignore
|
|
375
|
+
zf = ZipFile(fp, "r") # type: ignore
|
|
376
|
+
|
|
377
|
+
assert compare_spec == zf
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
def create_builder(task_context, zip_content, patterns):
|
|
381
|
+
builder = MetadataPackageZipBuilder.from_zipfile(
|
|
382
|
+
ZipFileSpec(zip_content).as_zipfile(),
|
|
383
|
+
context=task_context,
|
|
384
|
+
transforms=[
|
|
385
|
+
FindReplaceTransform(
|
|
386
|
+
FindReplaceTransformOptions.parse_obj({"patterns": patterns})
|
|
387
|
+
)
|
|
388
|
+
],
|
|
389
|
+
)
|
|
390
|
+
|
|
391
|
+
return builder
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
def zip_assert(builder, modified_zip_content):
|
|
395
|
+
assert ZipFileSpec(modified_zip_content) == builder.zf
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
def test_find_replace_static(task_context):
|
|
399
|
+
zip_content = {
|
|
400
|
+
Path("Foo.cls"): "System.debug('blah');",
|
|
401
|
+
}
|
|
402
|
+
patterns = [{"find": "bl", "replace": "ye"}]
|
|
403
|
+
builder = create_builder(task_context, zip_content, patterns)
|
|
404
|
+
|
|
405
|
+
modified_zip_content = {
|
|
406
|
+
Path("Foo.cls"): "System.debug('yeah');",
|
|
407
|
+
}
|
|
408
|
+
zip_assert(builder, modified_zip_content)
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
def test_xpath_replace_static(task_context):
|
|
412
|
+
zip_content = {
|
|
413
|
+
Path(
|
|
414
|
+
"Foo.xml"
|
|
415
|
+
): "<root><element1>blah</element1><element2>blah</element2></root>",
|
|
416
|
+
}
|
|
417
|
+
patterns = [{"xpath": "/root/element1", "replace": "yeah"}]
|
|
418
|
+
builder = create_builder(task_context, zip_content, patterns)
|
|
419
|
+
|
|
420
|
+
modified_zip_content = {
|
|
421
|
+
Path(
|
|
422
|
+
"Foo.xml"
|
|
423
|
+
): "<root><element1>yeah</element1><element2>blah</element2></root>",
|
|
424
|
+
}
|
|
425
|
+
zip_assert(builder, modified_zip_content)
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
def test_find_replace_xmlFile(task_context):
|
|
429
|
+
zip_content = {
|
|
430
|
+
Path(
|
|
431
|
+
"Foo.xml"
|
|
432
|
+
): "<root><blement1>blah</blement1><element2><element3>blah</element3></element2></root>",
|
|
433
|
+
Path("Bar.cls"): "System.debug('blah');",
|
|
434
|
+
}
|
|
435
|
+
patterns = [{"find": "bl", "replace": "ye"}]
|
|
436
|
+
builder = create_builder(task_context, zip_content, patterns)
|
|
437
|
+
|
|
438
|
+
modified_zip_content = {
|
|
439
|
+
Path(
|
|
440
|
+
"Foo.xml"
|
|
441
|
+
): "<root><blement1>yeah</blement1><element2><element3>yeah</element3></element2></root>",
|
|
442
|
+
Path("Bar.cls"): "System.debug('yeah');",
|
|
443
|
+
}
|
|
444
|
+
zip_assert(builder, modified_zip_content)
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
def test_find_replace_environ(task_context):
|
|
448
|
+
with mock.patch.dict(os.environ, {"INSERT_TEXT": "ye"}):
|
|
449
|
+
zip_content = {
|
|
450
|
+
Path("Foo.cls"): "System.debug('blah');",
|
|
451
|
+
}
|
|
452
|
+
patterns = [{"find": "bl", "replace_env": "INSERT_TEXT"}]
|
|
453
|
+
builder = create_builder(task_context, zip_content, patterns)
|
|
454
|
+
|
|
455
|
+
modified_zip_content = {
|
|
456
|
+
Path("Foo.cls"): "System.debug('yeah');",
|
|
457
|
+
}
|
|
458
|
+
zip_assert(builder, modified_zip_content)
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
def test_xpath_replace_environ(task_context):
|
|
462
|
+
with mock.patch.dict(os.environ, {"INSERT_TEXT": "yeah"}):
|
|
463
|
+
zip_content = {
|
|
464
|
+
Path(
|
|
465
|
+
"Foo.xml"
|
|
466
|
+
): "<root><element1>blah</element1><element2>blah</element2></root>",
|
|
467
|
+
}
|
|
468
|
+
patterns = [{"xpath": "/root/element1", "replace_env": "INSERT_TEXT"}]
|
|
469
|
+
builder = create_builder(task_context, zip_content, patterns)
|
|
470
|
+
|
|
471
|
+
modified_zip_content = {
|
|
472
|
+
Path(
|
|
473
|
+
"Foo.xml"
|
|
474
|
+
): "<root><element1>yeah</element1><element2>blah</element2></root>",
|
|
475
|
+
}
|
|
476
|
+
zip_assert(builder, modified_zip_content)
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
def test_find_replace_environ__not_found(task_context):
|
|
480
|
+
assert "INSERT_TEXT" not in os.environ
|
|
481
|
+
with pytest.raises(TaskOptionsError):
|
|
482
|
+
zip_content = {
|
|
483
|
+
Path("Foo.cls"): "System.debug('blah');",
|
|
484
|
+
}
|
|
485
|
+
patterns = [{"find": "bl", "replace_env": "INSERT_TEXT"}]
|
|
486
|
+
create_builder(task_context, zip_content, patterns)
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
def test_xpath_replace_environ__not_found(task_context):
|
|
490
|
+
assert "INSERT_TEXT" not in os.environ
|
|
491
|
+
with pytest.raises(TaskOptionsError):
|
|
492
|
+
zip_content = {
|
|
493
|
+
Path(
|
|
494
|
+
"Foo.xml"
|
|
495
|
+
): "<root><element1>blah</element1><element2>blah</element2></root>",
|
|
496
|
+
}
|
|
497
|
+
patterns = [{"xpath": "/root/element1", "replace_env": "INSERT_TEXT"}]
|
|
498
|
+
create_builder(task_context, zip_content, patterns)
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
def test_find_replace_filtered(task_context):
|
|
502
|
+
zip_content = {
|
|
503
|
+
Path("classes") / "Foo.cls": "System.debug('blah');",
|
|
504
|
+
Path("Bar.cls"): "System.debug('blah');",
|
|
505
|
+
}
|
|
506
|
+
patterns = [{"find": "bl", "replace": "ye", "paths": ["classes"]}]
|
|
507
|
+
builder = create_builder(task_context, zip_content, patterns)
|
|
508
|
+
|
|
509
|
+
modified_zip_content = {
|
|
510
|
+
Path("classes") / "Foo.cls": "System.debug('yeah');",
|
|
511
|
+
Path("Bar.cls"): "System.debug('blah');",
|
|
512
|
+
}
|
|
513
|
+
zip_assert(builder, modified_zip_content)
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
def test_xpath_replace_filtered(task_context):
|
|
517
|
+
zip_content = {
|
|
518
|
+
Path("classes")
|
|
519
|
+
/ "Foo.xml": "<root><element1>blah</element1><element2>blah</element2></root>",
|
|
520
|
+
Path(
|
|
521
|
+
"Bar.cls"
|
|
522
|
+
): "<root><element3>blah</element3><element4>blah</element4></root>",
|
|
523
|
+
}
|
|
524
|
+
patterns = [{"xpath": "/root/element1", "replace": "yeah", "paths": ["classes"]}]
|
|
525
|
+
builder = create_builder(task_context, zip_content, patterns)
|
|
526
|
+
|
|
527
|
+
modified_zip_content = {
|
|
528
|
+
Path("classes")
|
|
529
|
+
/ "Foo.xml": "<root><element1>yeah</element1><element2>blah</element2></root>",
|
|
530
|
+
Path(
|
|
531
|
+
"Bar.cls"
|
|
532
|
+
): "<root><element3>blah</element3><element4>blah</element4></root>",
|
|
533
|
+
}
|
|
534
|
+
zip_assert(builder, modified_zip_content)
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
def test_find_replace_multiple(task_context):
|
|
538
|
+
zip_content = {
|
|
539
|
+
Path("classes") / "Foo.cls": "System.debug('blah');",
|
|
540
|
+
Path("Bar.cls"): "System.debug('blah');",
|
|
541
|
+
}
|
|
542
|
+
patterns = [
|
|
543
|
+
{"find": "bl", "replace": "ye", "paths": ["classes"]},
|
|
544
|
+
{"find": "ye", "replace": "ha"},
|
|
545
|
+
]
|
|
546
|
+
builder = create_builder(task_context, zip_content, patterns)
|
|
547
|
+
|
|
548
|
+
modified_zip_content = {
|
|
549
|
+
Path("classes") / "Foo.cls": "System.debug('haah');",
|
|
550
|
+
Path("Bar.cls"): "System.debug('blah');",
|
|
551
|
+
}
|
|
552
|
+
zip_assert(builder, modified_zip_content)
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
def test_xpath_replace_multiple(task_context):
|
|
556
|
+
zip_content = {
|
|
557
|
+
Path("classes")
|
|
558
|
+
/ "Foo.xml": "<root><element1>blah</element1><element2>blah</element2></root>",
|
|
559
|
+
Path(
|
|
560
|
+
"Bar.cls"
|
|
561
|
+
): "<root><element3>blah</element3><element4>blah</element4></root>",
|
|
562
|
+
}
|
|
563
|
+
patterns = [
|
|
564
|
+
{"xpath": "/root/element1", "replace": "yeah", "paths": ["classes"]},
|
|
565
|
+
{"xpath": "/root/element1", "replace": "haah", "paths": ["classes"]},
|
|
566
|
+
{"xpath": "/root/element3", "replace": "yeah", "paths": ["classes"]},
|
|
567
|
+
]
|
|
568
|
+
builder = create_builder(task_context, zip_content, patterns)
|
|
569
|
+
|
|
570
|
+
modified_zip_content = {
|
|
571
|
+
Path("classes")
|
|
572
|
+
/ "Foo.xml": "<root><element1>haah</element1><element2>blah</element2></root>",
|
|
573
|
+
Path(
|
|
574
|
+
"Bar.cls"
|
|
575
|
+
): "<root><element3>blah</element3><element4>blah</element4></root>",
|
|
576
|
+
}
|
|
577
|
+
zip_assert(builder, modified_zip_content)
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
def test_find_replace_current_user(task_context):
|
|
581
|
+
patterns = [
|
|
582
|
+
{"find": "%%%CURRENT_USER%%%", "inject_username": True},
|
|
583
|
+
]
|
|
584
|
+
zip_content = {
|
|
585
|
+
Path("classes") / "Foo.cls": "System.debug('%%%CURRENT_USER%%%');",
|
|
586
|
+
Path("Bar.cls"): "System.debug('blah');",
|
|
587
|
+
}
|
|
588
|
+
builder = create_builder(task_context, zip_content, patterns)
|
|
589
|
+
expected_username = task_context.org_config.username
|
|
590
|
+
modified_zip_content = {
|
|
591
|
+
Path("classes") / "Foo.cls": f"System.debug('{expected_username}');",
|
|
592
|
+
Path("Bar.cls"): "System.debug('blah');",
|
|
593
|
+
}
|
|
594
|
+
zip_assert(builder, modified_zip_content)
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
def test_xpath_replace_current_user(task_context):
|
|
598
|
+
patterns = [
|
|
599
|
+
{"xpath": "/root/element1", "inject_username": True},
|
|
600
|
+
]
|
|
601
|
+
zip_content = {
|
|
602
|
+
Path("classes")
|
|
603
|
+
/ "Foo.cls": "<root><element1>blah</element1><element2>blah</element2></root>",
|
|
604
|
+
Path("Bar.cls"): "System.debug('blah');",
|
|
605
|
+
}
|
|
606
|
+
builder = create_builder(task_context, zip_content, patterns)
|
|
607
|
+
expected_username = task_context.org_config.username
|
|
608
|
+
modified_zip_content = {
|
|
609
|
+
Path("classes")
|
|
610
|
+
/ "Foo.cls": f"<root><element1>{expected_username}</element1><element2>blah</element2></root>",
|
|
611
|
+
Path("Bar.cls"): "System.debug('blah');",
|
|
612
|
+
}
|
|
613
|
+
zip_assert(builder, modified_zip_content)
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
def test_find_replace_org_url(task_context):
|
|
617
|
+
patterns = [
|
|
618
|
+
{
|
|
619
|
+
"find": "{url}",
|
|
620
|
+
"inject_org_url": True,
|
|
621
|
+
},
|
|
622
|
+
]
|
|
623
|
+
zip_content = {
|
|
624
|
+
Path("classes") / "Foo.cls": "System.debug('{url}');",
|
|
625
|
+
Path("Bar.cls"): "System.debug('blah');",
|
|
626
|
+
}
|
|
627
|
+
builder = create_builder(task_context, zip_content, patterns)
|
|
628
|
+
instance_url = task_context.org_config.instance_url
|
|
629
|
+
modified_zip_content = {
|
|
630
|
+
Path("classes") / "Foo.cls": f"System.debug('{instance_url}');",
|
|
631
|
+
Path("Bar.cls"): "System.debug('blah');",
|
|
632
|
+
}
|
|
633
|
+
zip_assert(builder, modified_zip_content)
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
def test_xpath_replace_org_url(task_context):
|
|
637
|
+
patterns = [
|
|
638
|
+
{
|
|
639
|
+
"xpath": "/root/element1",
|
|
640
|
+
"inject_org_url": True,
|
|
641
|
+
},
|
|
642
|
+
]
|
|
643
|
+
zip_content = {
|
|
644
|
+
Path("classes")
|
|
645
|
+
/ "Foo.cls": "<root><element1>blah</element1><element2>blah</element2></root>",
|
|
646
|
+
Path("Bar.cls"): "System.debug('blah');",
|
|
647
|
+
}
|
|
648
|
+
builder = create_builder(task_context, zip_content, patterns)
|
|
649
|
+
instance_url = task_context.org_config.instance_url
|
|
650
|
+
modified_zip_content = {
|
|
651
|
+
Path("classes")
|
|
652
|
+
/ "Foo.cls": f"<root><element1>{instance_url}</element1><element2>blah</element2></root>",
|
|
653
|
+
Path("Bar.cls"): "System.debug('blah');",
|
|
654
|
+
}
|
|
655
|
+
zip_assert(builder, modified_zip_content)
|
|
656
|
+
|
|
657
|
+
|
|
658
|
+
@pytest.mark.parametrize("api", [FindReplaceIdAPI.REST, FindReplaceIdAPI.TOOLING])
|
|
659
|
+
def test_xpath_replace_id(api):
|
|
660
|
+
context = mock.Mock()
|
|
661
|
+
result = {"totalSize": 1, "records": [{"Id": "00D"}]}
|
|
662
|
+
context.org_config.salesforce_client.query.return_value = result
|
|
663
|
+
context.org_config.tooling.query.return_value = result
|
|
664
|
+
patterns = [
|
|
665
|
+
{
|
|
666
|
+
"xpath": "/root/element1",
|
|
667
|
+
"replace_record_id_query": "SELECT Id FROM Account WHERE name='Initech Corp.'",
|
|
668
|
+
"api": api,
|
|
669
|
+
},
|
|
670
|
+
]
|
|
671
|
+
zip_content = {
|
|
672
|
+
Path("classes")
|
|
673
|
+
/ "Foo.cls": "<root><element1>blah</element1><element2>blah</element2></root>",
|
|
674
|
+
Path("Bar.cls"): "System.debug('blah');",
|
|
675
|
+
}
|
|
676
|
+
builder = create_builder(context, zip_content, patterns)
|
|
677
|
+
modified_zip_content = {
|
|
678
|
+
Path("classes")
|
|
679
|
+
/ "Foo.cls": "<root><element1>00D</element1><element2>blah</element2></root>",
|
|
680
|
+
Path("Bar.cls"): "System.debug('blah');",
|
|
681
|
+
}
|
|
682
|
+
zip_assert(builder, modified_zip_content)
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
@pytest.mark.parametrize("api", [FindReplaceIdAPI.REST, FindReplaceIdAPI.TOOLING])
|
|
686
|
+
def test_find_replace_id(api):
|
|
687
|
+
context = mock.Mock()
|
|
688
|
+
result = {"totalSize": 1, "records": [{"Id": "00D"}]}
|
|
689
|
+
context.org_config.salesforce_client.query.return_value = result
|
|
690
|
+
context.org_config.tooling.query.return_value = result
|
|
691
|
+
patterns = [
|
|
692
|
+
{
|
|
693
|
+
"find": "00Y",
|
|
694
|
+
"replace_record_id_query": "SELECT Id FROM Account WHERE name='Initech Corp.'",
|
|
695
|
+
"api": api,
|
|
696
|
+
},
|
|
697
|
+
]
|
|
698
|
+
zip_content = {
|
|
699
|
+
Path("classes") / "Foo.cls": "System.debug('00Y');",
|
|
700
|
+
Path("Bar.cls"): "System.debug('blah');",
|
|
701
|
+
}
|
|
702
|
+
builder = create_builder(context, zip_content, patterns)
|
|
703
|
+
modified_zip_content = {
|
|
704
|
+
Path("classes") / "Foo.cls": "System.debug('00D');",
|
|
705
|
+
Path("Bar.cls"): "System.debug('blah');",
|
|
706
|
+
}
|
|
707
|
+
zip_assert(builder, modified_zip_content)
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
def test_find_replace_id__bad_query_result():
|
|
711
|
+
context = mock.Mock()
|
|
712
|
+
result = {"totalSize": 0}
|
|
713
|
+
context.org_config.salesforce_client.query.return_value = result
|
|
714
|
+
patterns = [
|
|
715
|
+
{
|
|
716
|
+
"find": "00Y",
|
|
717
|
+
"replace_record_id_query": "SELECT Id FROM Account WHERE name='Initech Corp.'",
|
|
718
|
+
},
|
|
719
|
+
]
|
|
720
|
+
zip_content = {
|
|
721
|
+
Path("classes") / "Foo.cls": "System.debug('00Y');",
|
|
722
|
+
Path("Bar.cls"): "System.debug('blah');",
|
|
723
|
+
}
|
|
724
|
+
with pytest.raises(CumulusCIException):
|
|
725
|
+
create_builder(context, zip_content, patterns)
|
|
726
|
+
|
|
727
|
+
|
|
728
|
+
def test_xpath_replace_id__bad_query_result():
|
|
729
|
+
context = mock.Mock()
|
|
730
|
+
result = {"totalSize": 0}
|
|
731
|
+
context.org_config.salesforce_client.query.return_value = result
|
|
732
|
+
patterns = [
|
|
733
|
+
{
|
|
734
|
+
"xpath": "/root/element1",
|
|
735
|
+
"replace_record_id_query": "SELECT Id FROM Account WHERE name='Initech Corp.'",
|
|
736
|
+
},
|
|
737
|
+
]
|
|
738
|
+
zip_content = {
|
|
739
|
+
Path("classes")
|
|
740
|
+
/ "Foo.cls": "<root><element1>blah</element1><element2>blah</element2></root>",
|
|
741
|
+
Path("Bar.cls"): "System.debug('blah');",
|
|
742
|
+
}
|
|
743
|
+
with pytest.raises(CumulusCIException):
|
|
744
|
+
create_builder(context, zip_content, patterns)
|
|
745
|
+
|
|
746
|
+
|
|
747
|
+
def test_find_replace_id__no_id_returned():
|
|
748
|
+
context = mock.Mock()
|
|
749
|
+
result = {"totalSize": 1, "records": [{"name": "foo"}]}
|
|
750
|
+
context.org_config.salesforce_client.query.return_value = result
|
|
751
|
+
patterns = [
|
|
752
|
+
{
|
|
753
|
+
"find": "00Y",
|
|
754
|
+
"replace_record_id_query": "SELECT Id FROM Account WHERE name='Initech Corp.'",
|
|
755
|
+
},
|
|
756
|
+
]
|
|
757
|
+
zip_content = {
|
|
758
|
+
Path("classes") / "Foo.cls": "System.debug('00Y');",
|
|
759
|
+
Path("Bar.cls"): "System.debug('blah');",
|
|
760
|
+
}
|
|
761
|
+
with pytest.raises(CumulusCIException):
|
|
762
|
+
create_builder(context, zip_content, patterns)
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
def test_xpath_replace_id__no_id_returned():
|
|
766
|
+
context = mock.Mock()
|
|
767
|
+
result = {"totalSize": 1, "records": [{"name": "foo"}]}
|
|
768
|
+
context.org_config.salesforce_client.query.return_value = result
|
|
769
|
+
patterns = [
|
|
770
|
+
{
|
|
771
|
+
"xpath": "/root/element1",
|
|
772
|
+
"replace_record_id_query": "SELECT Id FROM Account WHERE name='Initech Corp.'",
|
|
773
|
+
},
|
|
774
|
+
]
|
|
775
|
+
zip_content = {
|
|
776
|
+
Path("classes")
|
|
777
|
+
/ "Foo.cls": "<root><element1>blah</element1><element2>blah</element2></root>",
|
|
778
|
+
Path("Bar.cls"): "System.debug('blah');",
|
|
779
|
+
}
|
|
780
|
+
with pytest.raises(CumulusCIException):
|
|
781
|
+
create_builder(context, zip_content, patterns)
|
|
782
|
+
|
|
783
|
+
|
|
784
|
+
def test_find_xpath_both_none(task_context):
|
|
785
|
+
zip_content = {
|
|
786
|
+
Path("Foo.cls"): "System.debug('blah');",
|
|
787
|
+
}
|
|
788
|
+
patterns = [{"replace": "ye"}]
|
|
789
|
+
with pytest.raises(ValidationError) as e:
|
|
790
|
+
create_builder(task_context, zip_content, patterns)
|
|
791
|
+
assert "Input is not valid. Please pass either find or xpath paramter." in str(e)
|
|
792
|
+
|
|
793
|
+
|
|
794
|
+
def test_find_xpath_both_empty(task_context):
|
|
795
|
+
zip_content = {
|
|
796
|
+
Path("Foo.cls"): "System.debug('blah');",
|
|
797
|
+
}
|
|
798
|
+
patterns = [{"find": "", "xpath": "", "replace": "ye"}]
|
|
799
|
+
with pytest.raises(ValidationError) as e:
|
|
800
|
+
create_builder(task_context, zip_content, patterns)
|
|
801
|
+
assert "Input is not valid. Please pass either find or xpath paramter." in str(e)
|
|
802
|
+
|
|
803
|
+
|
|
804
|
+
def test_find_xpath_both(task_context):
|
|
805
|
+
zip_content = {
|
|
806
|
+
Path("Foo.cls"): "System.debug('blah');",
|
|
807
|
+
}
|
|
808
|
+
patterns = [{"find": "bl", "xpath": "bl", "replace": "ye"}]
|
|
809
|
+
with pytest.raises(ValidationError) as e:
|
|
810
|
+
create_builder(task_context, zip_content, patterns)
|
|
811
|
+
assert (
|
|
812
|
+
"Input is not valid. Please pass either find or xpath paramter not both."
|
|
813
|
+
in str(e)
|
|
814
|
+
)
|
|
815
|
+
|
|
816
|
+
|
|
817
|
+
def test_invalid_xpath(task_context):
|
|
818
|
+
zip_content = {
|
|
819
|
+
Path(
|
|
820
|
+
"Foo.xml"
|
|
821
|
+
): "<root><element1>blah</element1><element2>blah</element2></root>",
|
|
822
|
+
}
|
|
823
|
+
patterns = [{"xpath": '/root/element1[tezxt()=="blah"]', "replace": "yeah"}]
|
|
824
|
+
with pytest.raises(ET.XPathError):
|
|
825
|
+
create_builder(task_context, zip_content, patterns)
|
|
826
|
+
|
|
827
|
+
|
|
828
|
+
def test_xpath_replace_with_index(task_context):
|
|
829
|
+
zip_content = {
|
|
830
|
+
Path(
|
|
831
|
+
"Foo.xml"
|
|
832
|
+
): '<bookstore> <book category="cooking"> <title lang="en">Everyday Italian</title> <author>Giada De Laurentiis</author> <year>2005</year> <price>30.00</price> </book> <book category="children"> <title lang="en">Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> <book category="web"> <title lang="en">XQuery Kick Start</title> <author>James McGovern</author> <author>Per Bothner</author> <author>Kurt Cagle</author> <author>James Linn</author> <author>Vaidyanathan Nagarajan</author> <year>2003</year> <price>49.99</price> </book> <book category="web"> <title lang="en">Learning XML</title> <author>Erik T. Ray</author> <year>2003</year> <price>39.95</price> </book> </bookstore>',
|
|
833
|
+
}
|
|
834
|
+
patterns = [{"xpath": "/bookstore/book[2]/title", "replace": "New Title"}]
|
|
835
|
+
builder = create_builder(task_context, zip_content, patterns)
|
|
836
|
+
|
|
837
|
+
modified_zip_content = {
|
|
838
|
+
Path(
|
|
839
|
+
"Foo.xml"
|
|
840
|
+
): '<bookstore> <book category="cooking"> <title lang="en">Everyday Italian</title> <author>Giada De Laurentiis</author> <year>2005</year> <price>30.00</price> </book> <book category="children"> <title lang="en">New Title</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> <book category="web"> <title lang="en">XQuery Kick Start</title> <author>James McGovern</author> <author>Per Bothner</author> <author>Kurt Cagle</author> <author>James Linn</author> <author>Vaidyanathan Nagarajan</author> <year>2003</year> <price>49.99</price> </book> <book category="web"> <title lang="en">Learning XML</title> <author>Erik T. Ray</author> <year>2003</year> <price>39.95</price> </book> </bookstore>',
|
|
841
|
+
}
|
|
842
|
+
zip_assert(builder, modified_zip_content)
|
|
843
|
+
|
|
844
|
+
|
|
845
|
+
def test_xpath_replace_with_text(task_context):
|
|
846
|
+
zip_content = {
|
|
847
|
+
Path(
|
|
848
|
+
"Foo.xml"
|
|
849
|
+
): '<bookstore> <book category="cooking"> <title lang="en">Everyday Italian</title> <author>Giada De Laurentiis</author> <year>2005</year> <price>30.00</price> </book> <book category="children"> <title lang="en">Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> <book category="web"> <title lang="en">XQuery Kick Start</title> <author>James McGovern</author> <author>Per Bothner</author> <author>Kurt Cagle</author> <author>James Linn</author> <author>Vaidyanathan Nagarajan</author> <year>2003</year> <price>49.99</price> </book> <book category="web"> <title lang="en">Learning XML</title> <author>Erik T. Ray</author> <year>2003</year> <price>39.95</price> </book> </bookstore>',
|
|
850
|
+
}
|
|
851
|
+
patterns = [
|
|
852
|
+
{
|
|
853
|
+
"xpath": "/bookstore/book/title[text()='Learning XML']",
|
|
854
|
+
"replace": "Updated Text",
|
|
855
|
+
}
|
|
856
|
+
]
|
|
857
|
+
builder = create_builder(task_context, zip_content, patterns)
|
|
858
|
+
|
|
859
|
+
modified_zip_content = {
|
|
860
|
+
Path(
|
|
861
|
+
"Foo.xml"
|
|
862
|
+
): '<bookstore> <book category="cooking"> <title lang="en">Everyday Italian</title> <author>Giada De Laurentiis</author> <year>2005</year> <price>30.00</price> </book> <book category="children"> <title lang="en">Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> <book category="web"> <title lang="en">XQuery Kick Start</title> <author>James McGovern</author> <author>Per Bothner</author> <author>Kurt Cagle</author> <author>James Linn</author> <author>Vaidyanathan Nagarajan</author> <year>2003</year> <price>49.99</price> </book> <book category="web"> <title lang="en">Updated Text</title> <author>Erik T. Ray</author> <year>2003</year> <price>39.95</price> </book> </bookstore>',
|
|
863
|
+
}
|
|
864
|
+
zip_assert(builder, modified_zip_content)
|
|
865
|
+
|
|
866
|
+
|
|
867
|
+
def test_xpath_replace_with_exp_and_index(task_context):
|
|
868
|
+
zip_content = {
|
|
869
|
+
Path(
|
|
870
|
+
"Foo.xml"
|
|
871
|
+
): '<bookstore> <book category="cooking"> <title lang="en">Everyday Italian</title> <author>Giada De Laurentiis</author> <year>2005</year> <price>30.00</price> </book> <book category="children"> <title lang="en">Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> <book category="web"> <title lang="en">XQuery Kick Start</title> <author>James McGovern</author> <author>Per Bothner</author> <author>Kurt Cagle</author> <author>James Linn</author> <author>Vaidyanathan Nagarajan</author> <year>2003</year> <price>49.99</price> </book> <book category="web"> <title lang="en">Learning XML</title> <author>Erik T. Ray</author> <year>2003</year> <price>39.95</price> </book> </bookstore>',
|
|
872
|
+
}
|
|
873
|
+
patterns = [
|
|
874
|
+
{"xpath": "/bookstore/book[price>40]/author[2]", "replace": "Rich Author"}
|
|
875
|
+
]
|
|
876
|
+
builder = create_builder(task_context, zip_content, patterns)
|
|
877
|
+
|
|
878
|
+
modified_zip_content = {
|
|
879
|
+
Path(
|
|
880
|
+
"Foo.xml"
|
|
881
|
+
): '<bookstore> <book category="cooking"> <title lang="en">Everyday Italian</title> <author>Giada De Laurentiis</author> <year>2005</year> <price>30.00</price> </book> <book category="children"> <title lang="en">Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> <book category="web"> <title lang="en">XQuery Kick Start</title> <author>James McGovern</author> <author>Rich Author</author> <author>Kurt Cagle</author> <author>James Linn</author> <author>Vaidyanathan Nagarajan</author> <year>2003</year> <price>49.99</price> </book> <book category="web"> <title lang="en">Learning XML</title> <author>Erik T. Ray</author> <year>2003</year> <price>39.95</price> </book> </bookstore>',
|
|
882
|
+
}
|
|
883
|
+
zip_assert(builder, modified_zip_content)
|
|
884
|
+
|
|
885
|
+
|
|
886
|
+
def test_xpath_replace_with_exp_and_index2(task_context):
|
|
887
|
+
zip_content = {
|
|
888
|
+
Path(
|
|
889
|
+
"Foo.xml"
|
|
890
|
+
): '<bookstore> <book category="cooking"> <title lang="en">Everyday Italian</title> <author>Giada De Laurentiis</author> <year>2005</year> <price>30.00</price> </book> <book category="children"> <title lang="en">Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> <book category="web"> <title lang="en">XQuery Kick Start</title> <author>James McGovern</author> <author>Per Bothner</author> <author>Kurt Cagle</author> <author>James Linn</author> <author>Vaidyanathan Nagarajan</author> <year>2003</year> <price>49.99</price> </book> <book category="web"> <title lang="en">Learning XML</title> <author>Erik T. Ray</author> <year>2003</year> <price>39.95</price> </book> </bookstore>',
|
|
891
|
+
}
|
|
892
|
+
patterns = [
|
|
893
|
+
{"xpath": "/bookstore/book[price<40]/author[1]", "replace": "Rich Author"}
|
|
894
|
+
]
|
|
895
|
+
builder = create_builder(task_context, zip_content, patterns)
|
|
896
|
+
|
|
897
|
+
modified_zip_content = {
|
|
898
|
+
Path(
|
|
899
|
+
"Foo.xml"
|
|
900
|
+
): '<bookstore> <book category="cooking"> <title lang="en">Everyday Italian</title> <author>Rich Author</author> <year>2005</year> <price>30.00</price> </book> <book category="children"> <title lang="en">Harry Potter</title> <author>Rich Author</author> <year>2005</year> <price>29.99</price> </book> <book category="web"> <title lang="en">XQuery Kick Start</title> <author>James McGovern</author> <author>Per Bothner</author> <author>Kurt Cagle</author> <author>James Linn</author> <author>Vaidyanathan Nagarajan</author> <year>2003</year> <price>49.99</price> </book> <book category="web"> <title lang="en">Learning XML</title> <author>Rich Author</author> <year>2003</year> <price>39.95</price> </book> </bookstore>',
|
|
901
|
+
}
|
|
902
|
+
zip_assert(builder, modified_zip_content)
|
|
903
|
+
|
|
904
|
+
|
|
905
|
+
def test_xpath_replace_with_exp(task_context):
|
|
906
|
+
zip_content = {
|
|
907
|
+
Path(
|
|
908
|
+
"Foo.xml"
|
|
909
|
+
): '<bookstore> <book category="cooking"> <title lang="en">Everyday Italian</title> <author>Giada De Laurentiis</author> <year>2005</year> <price>30.00</price> </book> <book category="children"> <title lang="en">Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> <book category="web"> <title lang="en">XQuery Kick Start</title> <author>James McGovern</author> <author>Per Bothner</author> <author>Kurt Cagle</author> <author>James Linn</author> <author>Vaidyanathan Nagarajan</author> <year>2003</year> <price>49.99</price> </book> <book category="web"> <title lang="en">Learning XML</title> <author>Erik T. Ray</author> <year>2003</year> <price>39.95</price> </book> </bookstore>',
|
|
910
|
+
}
|
|
911
|
+
patterns = [{"xpath": "/bookstore/book[price>40]/author", "replace": "Rich Author"}]
|
|
912
|
+
builder = create_builder(task_context, zip_content, patterns)
|
|
913
|
+
|
|
914
|
+
modified_zip_content = {
|
|
915
|
+
Path(
|
|
916
|
+
"Foo.xml"
|
|
917
|
+
): '<bookstore> <book category="cooking"> <title lang="en">Everyday Italian</title> <author>Giada De Laurentiis</author> <year>2005</year> <price>30.00</price> </book> <book category="children"> <title lang="en">Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> <book category="web"> <title lang="en">XQuery Kick Start</title> <author>Rich Author</author> <author>Rich Author</author> <author>Rich Author</author> <author>Rich Author</author> <author>Rich Author</author> <year>2003</year> <price>49.99</price> </book> <book category="web"> <title lang="en">Learning XML</title> <author>Erik T. Ray</author> <year>2003</year> <price>39.95</price> </book> </bookstore>',
|
|
918
|
+
}
|
|
919
|
+
zip_assert(builder, modified_zip_content)
|
|
920
|
+
|
|
921
|
+
|
|
922
|
+
def test_source_transform_parsing():
|
|
923
|
+
tl = SourceTransformList.parse_obj(
|
|
924
|
+
[
|
|
925
|
+
"clean_meta_xml",
|
|
926
|
+
{"transform": "inject_namespace", "options": {"namespace_tokenize": "foo"}},
|
|
927
|
+
{"transform": "remove_feature_parameters"},
|
|
928
|
+
]
|
|
929
|
+
)
|
|
930
|
+
|
|
931
|
+
assert len(tl.__root__) == 3
|
|
932
|
+
assert isinstance(tl.__root__[0], SourceTransformSpec)
|
|
933
|
+
assert isinstance(tl.__root__[1], SourceTransformSpec)
|
|
934
|
+
assert tl.__root__[1].parsed_options() is not None
|
|
935
|
+
assert isinstance(tl.__root__[2], SourceTransformSpec)
|
|
936
|
+
assert tl.__root__[2].parsed_options() is None
|
|
937
|
+
|
|
938
|
+
tf = tl.as_transforms()
|
|
939
|
+
|
|
940
|
+
assert isinstance(tf[0], CleanMetaXMLTransform)
|
|
941
|
+
assert isinstance(tf[1], NamespaceInjectionTransform)
|
|
942
|
+
assert isinstance(tf[2], RemoveFeatureParametersTransform)
|
|
943
|
+
assert tf[1].options.namespace_tokenize == "foo"
|
|
944
|
+
|
|
945
|
+
|
|
946
|
+
def test_source_transform_parsing__bad_transform():
|
|
947
|
+
with pytest.raises(ValidationError) as e:
|
|
948
|
+
SourceTransformList.parse_obj(
|
|
949
|
+
[
|
|
950
|
+
"destroy_the_things",
|
|
951
|
+
]
|
|
952
|
+
)
|
|
953
|
+
|
|
954
|
+
assert "destroy_the_things is not valid" in str(e)
|
|
955
|
+
|
|
956
|
+
|
|
957
|
+
def test_strip_unwanted_files(task_context):
|
|
958
|
+
"""
|
|
959
|
+
This test covers all strip options available during deployment.
|
|
960
|
+
It covers below scenarios:
|
|
961
|
+
1. Class files - Removes Bar.class and keeps Foo.class file
|
|
962
|
+
2. Aura files - Removes aura2.cmp file and keeps aura1.cmp file
|
|
963
|
+
3. Report files - Keeps TestReports folder, FooReport.report file and deletes BlahReport.report file
|
|
964
|
+
4. Custom object files - Removes Test2__c.CustomField2__c field from Test2__c.object file
|
|
965
|
+
5. Lightning bundle - Removes lwc2.cmp file from lwc folder
|
|
966
|
+
"""
|
|
967
|
+
|
|
968
|
+
with temporary_dir() as temp_dir:
|
|
969
|
+
package_xml_data = """<?xml version="1.0" encoding="UTF-8"?>
|
|
970
|
+
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
971
|
+
<fullName>TestPackage</fullName>
|
|
972
|
+
<types>
|
|
973
|
+
<members>Foo</members>
|
|
974
|
+
<name>ApexClass</name>
|
|
975
|
+
</types>
|
|
976
|
+
<types>
|
|
977
|
+
<members>bundle1</members>
|
|
978
|
+
<name>AuraDefinitionBundle</name>
|
|
979
|
+
</types>
|
|
980
|
+
<types>
|
|
981
|
+
<members>TestReports</members>
|
|
982
|
+
<members>TestReports/FooReport</members>
|
|
983
|
+
<name>Report</name>
|
|
984
|
+
</types>
|
|
985
|
+
<types>
|
|
986
|
+
<members>Test1__c.CustomField1__c</members>
|
|
987
|
+
<members>Test1__c.CustomField2__c</members>
|
|
988
|
+
<members>Test2__c.CustomField1__c</members>
|
|
989
|
+
<name>CustomField</name>
|
|
990
|
+
</types>
|
|
991
|
+
<types>
|
|
992
|
+
<members>Test1__c</members>
|
|
993
|
+
<members>Test2__c</members>
|
|
994
|
+
<name>CustomObject</name>
|
|
995
|
+
</types>
|
|
996
|
+
<types>
|
|
997
|
+
<members>lwcBundle1</members>
|
|
998
|
+
<name>LightningComponentBundle</name>
|
|
999
|
+
</types>
|
|
1000
|
+
<version>43.0</version>
|
|
1001
|
+
</Package>
|
|
1002
|
+
"""
|
|
1003
|
+
meta_xml = """<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
1004
|
+
<apiVersion>56.0</apiVersion>
|
|
1005
|
+
</ApexClass>"""
|
|
1006
|
+
|
|
1007
|
+
object_xml_data = """<?xml version='1.0' encoding='UTF-8'?>
|
|
1008
|
+
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
1009
|
+
<fields>
|
|
1010
|
+
<fullName>CustomField1__c</fullName>
|
|
1011
|
+
<externalId>false</externalId>
|
|
1012
|
+
<label>Expected Completion Date</label>
|
|
1013
|
+
<required>false</required>
|
|
1014
|
+
<trackTrending>false</trackTrending>
|
|
1015
|
+
<type>Text</type>
|
|
1016
|
+
</fields>
|
|
1017
|
+
<fields>
|
|
1018
|
+
<fullName>CustomField2__c</fullName>
|
|
1019
|
+
<externalId>false</externalId>
|
|
1020
|
+
<label>Expected Completion Date</label>
|
|
1021
|
+
<required>false</required>
|
|
1022
|
+
<trackTrending>false</trackTrending>
|
|
1023
|
+
<type>Text</type>
|
|
1024
|
+
</fields>
|
|
1025
|
+
</CustomObject>"""
|
|
1026
|
+
strip_object2_xml_data = """<?xml version='1.0' encoding='UTF-8'?>
|
|
1027
|
+
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
1028
|
+
<fields>
|
|
1029
|
+
<fullName>CustomField1__c</fullName>
|
|
1030
|
+
<externalId>false</externalId>
|
|
1031
|
+
<label>Expected Completion Date</label>
|
|
1032
|
+
<required>false</required>
|
|
1033
|
+
<trackTrending>false</trackTrending>
|
|
1034
|
+
<type>Text</type>
|
|
1035
|
+
</fields>
|
|
1036
|
+
</CustomObject>"""
|
|
1037
|
+
td = Path(temp_dir)
|
|
1038
|
+
|
|
1039
|
+
(td / "package_test.xml").write_text(package_xml_data)
|
|
1040
|
+
builder = MetadataPackageZipBuilder.from_zipfile(
|
|
1041
|
+
ZipFileSpec(
|
|
1042
|
+
{
|
|
1043
|
+
Path(os.path.join("aura", "bundle1", "aura1.cmp")): "Comp 1",
|
|
1044
|
+
Path(os.path.join("aura", "bundle2", "aura2.cmp")): "Comp 2",
|
|
1045
|
+
Path(os.path.join("classes", "Foo.cls")): "System.debug('foo');",
|
|
1046
|
+
Path(os.path.join("classes", "Foo.cls-meta.xml")): meta_xml,
|
|
1047
|
+
Path(os.path.join("classes", "Bar.cls")): "System.debug('bar');",
|
|
1048
|
+
Path(os.path.join("classes", "Bar.cls-meta.xml")): meta_xml,
|
|
1049
|
+
Path(os.path.join("reports", "TestReports-meta.xml")): meta_xml,
|
|
1050
|
+
Path(
|
|
1051
|
+
os.path.join("reports", "TestReports"), "FooReport.report"
|
|
1052
|
+
): "Foo Report",
|
|
1053
|
+
Path(
|
|
1054
|
+
os.path.join("reports", "TestReports"), "BlahReport.report"
|
|
1055
|
+
): "Blah Report",
|
|
1056
|
+
Path(os.path.join("objects", "Test1__c.object")): object_xml_data,
|
|
1057
|
+
Path(os.path.join("objects", "Test2__c.object")): object_xml_data,
|
|
1058
|
+
Path(os.path.join("lwc", "lwcBundle1", "lwc1.cmp")): "Comp 1",
|
|
1059
|
+
Path(os.path.join("lwc", "lwcBundle2", "lwc2.cmp")): "Comp 2",
|
|
1060
|
+
}
|
|
1061
|
+
).as_zipfile(),
|
|
1062
|
+
context=task_context,
|
|
1063
|
+
transforms=[
|
|
1064
|
+
StripUnwantedComponentTransform(
|
|
1065
|
+
StripUnwantedComponentsOptions.parse_obj(
|
|
1066
|
+
{"package_xml": "package_test.xml"}
|
|
1067
|
+
)
|
|
1068
|
+
)
|
|
1069
|
+
],
|
|
1070
|
+
)
|
|
1071
|
+
|
|
1072
|
+
assert (
|
|
1073
|
+
ZipFileSpec(
|
|
1074
|
+
{
|
|
1075
|
+
Path(os.path.join("aura", "bundle1", "aura1.cmp")): "Comp 1",
|
|
1076
|
+
Path(os.path.join("classes", "Foo.cls")): "System.debug('foo');",
|
|
1077
|
+
Path(os.path.join("classes", "Foo.cls-meta.xml")): meta_xml,
|
|
1078
|
+
Path(os.path.join("reports", "TestReports-meta.xml")): meta_xml,
|
|
1079
|
+
Path(
|
|
1080
|
+
os.path.join("reports", "TestReports"), "FooReport.report"
|
|
1081
|
+
): "Foo Report",
|
|
1082
|
+
Path(os.path.join("objects", "Test1__c.object")): object_xml_data,
|
|
1083
|
+
Path(
|
|
1084
|
+
os.path.join("objects", "Test2__c.object")
|
|
1085
|
+
): strip_object2_xml_data,
|
|
1086
|
+
Path(os.path.join("lwc", "lwcBundle1", "lwc1.cmp")): "Comp 1",
|
|
1087
|
+
Path("package.xml"): package_xml_data,
|
|
1088
|
+
}
|
|
1089
|
+
)
|
|
1090
|
+
== builder.zf
|
|
1091
|
+
)
|