Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sh/fix deploy sharing rules #1419

Merged
merged 2 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/registry/metadataRegistry.json
Original file line number Diff line number Diff line change
Expand Up @@ -3984,10 +3984,10 @@
"sharingrules": {
"children": {
"directories": {
"sharingCriteriaRules": "sharingcriteriarule",
"sharingGuestRules": "sharingguestrule",
"sharingOwnerRules": "sharingownerrule",
"sharingTerritoryRules": "sharingterritoryrule"
"sharingCriteriaRules": "sharingRules",
"sharingGuestRules": "sharingRules",
"sharingOwnerRules": "sharingRules",
"sharingTerritoryRules": "sharingRules"
},
"suffixes": {
"sharingCriteriaRule": "sharingcriteriarule",
Expand All @@ -3997,31 +3997,31 @@
},
"types": {
"sharingcriteriarule": {
"directoryName": "sharingCriteriaRules",
"directoryName": "sharingRules",
"id": "sharingcriteriarule",
"name": "SharingCriteriaRule",
"suffix": "sharingCriteriaRule",
"uniqueIdElement": "fullName",
"xmlElementName": "sharingCriteriaRules"
},
"sharingguestrule": {
"directoryName": "sharingGuestRules",
"directoryName": "sharingRules",
"id": "sharingguestrule",
"name": "SharingGuestRule",
"suffix": "sharingGuestRule",
"uniqueIdElement": "fullName",
"xmlElementName": "sharingGuestRules"
},
"sharingownerrule": {
"directoryName": "sharingOwnerRules",
"directoryName": "sharingRules",
"id": "sharingownerrule",
"name": "SharingOwnerRule",
"suffix": "sharingOwnerRule",
"uniqueIdElement": "fullName",
"xmlElementName": "sharingOwnerRules"
},
"sharingterritoryrule": {
"directoryName": "sharingTerritoryRules",
"directoryName": "sharingRules",
"id": "sharingterritoryrule",
"name": "SharingTerritoryRule",
"suffix": "sharingTerritoryRule",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@ describe('Creating and converting ComponentSets with destructive changes', () =>
for (const file of convertedFiles) {
await fileSnap(file, testDir);
}
dirsAreIdentical(path.join(snapshotsDir, 'testOutput', 'pre1'), pre1TestOutputDir);
const expectedOutputDir = path.join(
snapshotsDir,
'1-pre-destructive-and-1-deployment.expected',
'testOutput',
'pre1'
);
await dirsAreIdentical(expectedOutputDir, pre1TestOutputDir);
});

it('2 pre-destructive and 2 deployments', async () => {
Expand All @@ -82,7 +88,13 @@ describe('Creating and converting ComponentSets with destructive changes', () =>
for (const file of convertedFiles) {
await fileSnap(file, testDir);
}
dirsAreIdentical(path.join(snapshotsDir, 'testOutput', 'pre2'), pre2TestOutputDir);
const expectedOutputDir = path.join(
snapshotsDir,
'2-pre-destructive-and-2-deployments.expected',
'testOutput',
'pre2'
);
await dirsAreIdentical(expectedOutputDir, pre2TestOutputDir);
});

it('1 post-destructive and 1 deployment', async () => {
Expand All @@ -107,7 +119,13 @@ describe('Creating and converting ComponentSets with destructive changes', () =>
for (const file of convertedFiles) {
await fileSnap(file, testDir);
}
dirsAreIdentical(path.join(snapshotsDir, 'testOutput', 'post1'), postTestOutputDir);
const expectedOutputDir = path.join(
snapshotsDir,
'1-post-destructive-and-1-deployment.expected',
'testOutput',
'post1'
);
await dirsAreIdentical(expectedOutputDir, postTestOutputDir);
});

it('2 post-destructive and 2 deployments', async () => {
Expand All @@ -132,7 +150,13 @@ describe('Creating and converting ComponentSets with destructive changes', () =>
for (const file of convertedFiles) {
await fileSnap(file, testDir);
}
dirsAreIdentical(path.join(snapshotsDir, 'testOutput', 'post2'), post2TestOutputDir);
const expectedOutputDir = path.join(
snapshotsDir,
'2-post-destructive-and-2-deployments.expected',
'testOutput',
'post2'
);
await dirsAreIdentical(expectedOutputDir, post2TestOutputDir);
});

it('1 post-destructive and no deployment', async () => {
Expand All @@ -157,7 +181,13 @@ describe('Creating and converting ComponentSets with destructive changes', () =>
for (const file of convertedFiles) {
await fileSnap(file, testDir);
}
dirsAreIdentical(path.join(snapshotsDir, 'testOutput', 'post1-solo'), postTestOutputDir);
const expectedOutputDir = path.join(
snapshotsDir,
'1-post-destructive-and-no-deployment.expected',
'testOutput',
'post1-solo'
);
await dirsAreIdentical(expectedOutputDir, postTestOutputDir);
});

it('throws when wildcards are used in destructive changes', async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>account.AcctCBS_toAllInternal</members>
<name>SharingCriteriaRule</name>
</types>
<version>52.0</version>
</Package>
Loading
Loading