cumulusci-plus 5.0.35__py3-none-any.whl → 5.0.45__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.
- cumulusci/__about__.py +1 -1
- cumulusci/cli/cci.py +3 -2
- cumulusci/cli/task.py +9 -10
- cumulusci/cli/tests/test_org.py +5 -0
- cumulusci/cli/tests/test_task.py +34 -0
- cumulusci/core/config/__init__.py +1 -0
- cumulusci/core/config/org_config.py +2 -1
- cumulusci/core/config/project_config.py +12 -0
- cumulusci/core/config/scratch_org_config.py +12 -0
- cumulusci/core/config/sfdx_org_config.py +4 -1
- cumulusci/core/config/tests/test_config.py +1 -0
- cumulusci/core/dependencies/base.py +4 -0
- cumulusci/cumulusci.yml +18 -1
- cumulusci/schema/cumulusci.jsonschema.json +5 -0
- cumulusci/tasks/apex/testrunner.py +7 -4
- cumulusci/tasks/bulkdata/tests/test_select_utils.py +20 -0
- cumulusci/tasks/metadata_etl/__init__.py +2 -0
- cumulusci/tasks/metadata_etl/applications.py +256 -0
- cumulusci/tasks/metadata_etl/tests/test_applications.py +710 -0
- cumulusci/tasks/salesforce/insert_record.py +18 -19
- cumulusci/tasks/salesforce/tests/test_enable_prediction.py +4 -2
- cumulusci/tasks/salesforce/tests/test_update_external_auth_identity_provider.py +927 -0
- cumulusci/tasks/salesforce/tests/test_update_external_credential.py +523 -8
- cumulusci/tasks/salesforce/tests/test_update_record.py +512 -0
- cumulusci/tasks/salesforce/update_external_auth_identity_provider.py +551 -0
- cumulusci/tasks/salesforce/update_external_credential.py +89 -4
- cumulusci/tasks/salesforce/update_record.py +217 -0
- cumulusci/tasks/sfdmu/sfdmu.py +14 -1
- cumulusci/tasks/utility/credentialManager.py +58 -12
- cumulusci/tasks/utility/secretsToEnv.py +42 -11
- cumulusci/tasks/utility/tests/test_credentialManager.py +586 -0
- cumulusci/tasks/utility/tests/test_secretsToEnv.py +1240 -62
- cumulusci/utils/yaml/cumulusci_yml.py +1 -0
- {cumulusci_plus-5.0.35.dist-info → cumulusci_plus-5.0.45.dist-info}/METADATA +5 -7
- {cumulusci_plus-5.0.35.dist-info → cumulusci_plus-5.0.45.dist-info}/RECORD +39 -33
- {cumulusci_plus-5.0.35.dist-info → cumulusci_plus-5.0.45.dist-info}/WHEEL +1 -1
- {cumulusci_plus-5.0.35.dist-info → cumulusci_plus-5.0.45.dist-info}/entry_points.txt +0 -0
- {cumulusci_plus-5.0.35.dist-info → cumulusci_plus-5.0.45.dist-info}/licenses/AUTHORS.rst +0 -0
- {cumulusci_plus-5.0.35.dist-info → cumulusci_plus-5.0.45.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from cumulusci.core.exceptions import SalesforceException
|
|
2
|
-
from cumulusci.core.utils import process_bool_arg, process_list_of_pairs_dict_arg
|
|
3
2
|
from cumulusci.tasks.salesforce import BaseSalesforceApiTask
|
|
3
|
+
from cumulusci.utils.options import CCIOptions, Field, MappingOption
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
class InsertRecord(BaseSalesforceApiTask):
|
|
@@ -10,31 +10,30 @@ class InsertRecord(BaseSalesforceApiTask):
|
|
|
10
10
|
cci task run insert_record --org dev -o object PermissionSet -o values Name:HardDelete,PermissionsBulkApiHardDelete:true
|
|
11
11
|
"""
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
class Options(CCIOptions):
|
|
14
|
+
object: str = Field(..., description="An sObject type to insert")
|
|
15
|
+
values: MappingOption = Field(
|
|
16
|
+
...,
|
|
17
|
+
description="Field names and values in the format 'aa:bb,cc:dd', or a YAML dict in cumulusci.yml.",
|
|
18
|
+
)
|
|
19
|
+
tooling: bool = Field(
|
|
20
|
+
False, description="If True, use the Tooling API instead of REST API."
|
|
21
|
+
)
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
super()._init_options(kwargs)
|
|
24
|
-
self.values = process_list_of_pairs_dict_arg(self.options["values"])
|
|
25
|
-
self.object = self.options["object"]
|
|
26
|
-
self.use_tooling = process_bool_arg(self.options.get("tooling", False))
|
|
23
|
+
parsed_options: Options
|
|
27
24
|
|
|
28
25
|
def _run_task(self):
|
|
29
|
-
api = self.sf if not self.
|
|
30
|
-
object_handler = getattr(api, self.object)
|
|
26
|
+
api = self.sf if not self.parsed_options.tooling else self.tooling
|
|
27
|
+
object_handler = getattr(api, self.parsed_options.object)
|
|
31
28
|
|
|
32
|
-
rc = object_handler.create(self.values)
|
|
29
|
+
rc = object_handler.create(self.parsed_options.values)
|
|
33
30
|
if rc["success"]:
|
|
34
|
-
self.logger.info(
|
|
31
|
+
self.logger.info(
|
|
32
|
+
f"{self.parsed_options.object} record inserted: {rc['id']}"
|
|
33
|
+
)
|
|
35
34
|
else:
|
|
36
35
|
# this will probably never execute, due to simple_salesforce throwing
|
|
37
36
|
# an exception, but just in case:
|
|
38
37
|
raise SalesforceException(
|
|
39
|
-
f"Could not insert {self.object} record : {rc['errors']}"
|
|
38
|
+
f"Could not insert {self.parsed_options.object} record : {rc['errors']}"
|
|
40
39
|
)
|
|
@@ -60,11 +60,12 @@ def mock_oauth():
|
|
|
60
60
|
"IsSandbox": False,
|
|
61
61
|
"InstanceName": "NA149",
|
|
62
62
|
"NamespacePrefix": None,
|
|
63
|
+
"Name": "Test Org",
|
|
63
64
|
},
|
|
64
65
|
)
|
|
65
66
|
rsps.add(
|
|
66
67
|
"GET",
|
|
67
|
-
url="https://test-dev-ed.my.salesforce.com/services/data/
|
|
68
|
+
url=f"https://test-dev-ed.my.salesforce.com/services/data/v{CURRENT_SF_API_VERSION}/tooling/query/?q=SELECT%20SubscriberPackage.Id,%20SubscriberPackage.Name,%20SubscriberPackage.NamespacePrefix,%20SubscriberPackageVersionId%20FROM%20InstalledSubscriberPackage",
|
|
68
69
|
json={"records": []},
|
|
69
70
|
status=200,
|
|
70
71
|
)
|
|
@@ -187,6 +188,7 @@ def test_run_task__namespaced_org(mock_oauth, task):
|
|
|
187
188
|
"IsSandbox": False,
|
|
188
189
|
"InstanceName": "NA149",
|
|
189
190
|
"NamespacePrefix": "foo",
|
|
191
|
+
"Name": "Test Org",
|
|
190
192
|
},
|
|
191
193
|
)
|
|
192
194
|
|
|
@@ -203,7 +205,7 @@ def test_run_task__managed_org(mock_oauth, task):
|
|
|
203
205
|
|
|
204
206
|
mock_oauth.remove(
|
|
205
207
|
"GET",
|
|
206
|
-
url="https://test-dev-ed.my.salesforce.com/services/data/
|
|
208
|
+
url=f"https://test-dev-ed.my.salesforce.com/services/data/v{CURRENT_SF_API_VERSION}/tooling/query/?q=SELECT%20SubscriberPackage.Id,%20SubscriberPackage.Name,%20SubscriberPackage.NamespacePrefix,%20SubscriberPackageVersionId%20FROM%20InstalledSubscriberPackage",
|
|
207
209
|
)
|
|
208
210
|
|
|
209
211
|
mock_oauth.add(
|