Skip to content

Commit e53f191

Browse files
committed
Add integration tests for all selection strategies
1 parent 138241e commit e53f191

16 files changed

Lines changed: 2115 additions & 0 deletions
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
version: 1
2+
interactions:
3+
- &id001
4+
include_file: GET_sobjects_Global_describe.yaml
5+
- &id002
6+
include_file: GET_sobjects_Account_describe.yaml
7+
- *id001
8+
- *id002
9+
- *id002
10+
11+
- &id003
12+
include_file: GET_sobjects_Contact_describe.yaml
13+
- *id001
14+
- *id003
15+
- *id003
16+
- &id007
17+
include_file: GET_sobjects_Opportunity_describe.yaml
18+
- *id002
19+
- &id008
20+
include_file: GET_sobjects_Lead_describe.yaml # Added interaction for Lead
21+
- *id001
22+
- &id009
23+
include_file: GET_sobjects_Event_describe.yaml # Added interaction for Event
24+
- *id001
25+
- *id008
26+
- *id001
27+
- *id009
28+
- *id001
29+
30+
- request:
31+
method: GET
32+
uri: https://orgname.my.salesforce.com/services/data/v62.0/limits/recordCount?sObjects=Account
33+
body: null
34+
headers: &id004
35+
Request-Headers:
36+
- Elided
37+
response:
38+
status:
39+
code: 200
40+
message: OK
41+
headers: &id006
42+
Content-Type:
43+
- application/json;charset=UTF-8
44+
Others: Elided
45+
body:
46+
string: "{\n \"sObjects\" : [ {\n \"count\" : 3,\n \"name\" : \"Account\"\n
47+
\ } ]\n}"
48+
49+
- request:
50+
method: GET
51+
uri: https://orgname.my.salesforce.com/services/data/v62.0/query/?q=SELECT%20Id,%20Name,%20Description,%20Phone,%20AccountNumber%20FROM%20Account%20WHERE%20Name%20!=%20'Sample%20Account%20for%20Entitlements'
52+
body: null
53+
headers: *id004
54+
response:
55+
status:
56+
code: 200
57+
message: OK
58+
headers: *id006
59+
body:
60+
string: "{\n \"totalSize\" : 10,\n \"done\" : true,\n \"records\" : [ {\n
61+
\ \"attributes\" : {\n \"type\" : \"Account\",\n \"url\" : \"/services/data/v62.0/sobjects/Account/0019H00000H1RMDQA3\"\n
62+
\ },\n \"Id\" : \"0019H00000H1RMDQA3\",\n \"Name\" : \"Tom Cruise\",\n
63+
\ \"Description\" : \"Some Description\",\n \"Phone\" : \"12345632\",\n
64+
\ \"AccountNumber\" : \"123\"\n }, {\n \"attributes\" : {\n \"type\"
65+
: \"Account\",\n \"url\" : \"/services/data/v62.0/sobjects/Account/0019H00000H1RMEQA3\"\n
66+
\ },\n \"Id\" : \"0019H00000H1RMEQA3\",\n \"Name\" : \"Bob The Builder\",\n
67+
\ \"Description\" : \"Some Description\",\n \"Phone\" : \"12345632\",\n
68+
\ \"AccountNumber\" : \"123\"\n }, {\n \"attributes\" : {\n \"type\"
69+
: \"Account\",\n \"url\" : \"/services/data/v62.0/sobjects/Account/0019H00000H1RMFQA3\"\n
70+
\ },\n \"Id\" : \"0019H00000H1RMFQA3\",\n \"Name\" : \"Shah Rukh Khan\",\n
71+
\ \"Description\" : \"Bollywood actor\",\n \"Phone\" : \"12345612\",\n
72+
\ \"AccountNumber\" : \"123\"\n }, {\n \"attributes\" : {\n \"type\"
73+
: \"Account\",\n \"url\" : \"/services/data/v62.0/sobjects/Account/0019H00000H1RMGQA3\"\n
74+
\ },\n \"Id\" : \"0019H00000H1RMGQA3\",\n \"Name\" : \"Aamir Khan\",\n
75+
\ \"Description\" : \"Mr perfectionist, bollywood actor\",\n \"Phone\"
76+
: \"12345623\",\n \"AccountNumber\" : \"123\"\n }, {\n \"attributes\"
77+
: {\n \"type\" : \"Account\",\n \"url\" : \"/services/data/v62.0/sobjects/Account/0019H00000H1RMHQA3\"\n
78+
\ },\n \"Id\" : \"0019H00000H1RMHQA3\",\n \"Name\" : \"Salman Khan\",\n
79+
\ \"Description\" : \"Mr perfectionist, bollywood actor\",\n \"Phone\"
80+
: \"12345623\",\n \"AccountNumber\" : \"123\"\n }, {\n \"attributes\"
81+
: {\n \"type\" : \"Account\",\n \"url\" : \"/services/data/v62.0/sobjects/Account/0019H00000H1UzyQAF\"\n
82+
\ },\n \"Id\" : \"0019H00000H1UzyQAF\",\n \"Name\" : \"Tom Cruise\",\n
83+
\ \"Description\" : \"Some Description\",\n \"Phone\" : \"12345632\",\n
84+
\ \"AccountNumber\" : \"123\"\n }, {\n \"attributes\" : {\n \"type\"
85+
: \"Account\",\n \"url\" : \"/services/data/v62.0/sobjects/Account/0019H00000H1UzzQAF\"\n
86+
\ },\n \"Id\" : \"0019H00000H1UzzQAF\",\n \"Name\" : \"Bob The Builder\",\n
87+
\ \"Description\" : \"Some Description\",\n \"Phone\" : \"12345632\",\n
88+
\ \"AccountNumber\" : \"123\"\n }, {\n \"attributes\" : {\n \"type\"
89+
: \"Account\",\n \"url\" : \"/services/data/v62.0/sobjects/Account/0019H00000H1V00QAF\"\n
90+
\ },\n \"Id\" : \"0019H00000H1V00QAF\",\n \"Name\" : \"Shah Rukh Khan\",\n
91+
\ \"Description\" : \"Bollywood actor\",\n \"Phone\" : \"12345612\",\n
92+
\ \"AccountNumber\" : \"123\"\n }, {\n \"attributes\" : {\n \"type\"
93+
: \"Account\",\n \"url\" : \"/services/data/v62.0/sobjects/Account/0019H00000H1V01QAF\"\n
94+
\ },\n \"Id\" : \"0019H00000H1V01QAF\",\n \"Name\" : \"Aamir Khan\",\n
95+
\ \"Description\" : \"Mr perfectionist, bollywood actor\",\n \"Phone\"
96+
: \"12345623\",\n \"AccountNumber\" : \"123\"\n }, {\n \"attributes\"
97+
: {\n \"type\" : \"Account\",\n \"url\" : \"/services/data/v62.0/sobjects/Account/0019H00000H1V02QAF\"\n
98+
\ },\n \"Id\" : \"0019H00000H1V02QAF\",\n \"Name\" : \"Salman Khan\",\n
99+
\ \"Description\" : \"Mr perfectionist, bollywood actor\",\n \"Phone\"
100+
: \"12345623\",\n \"AccountNumber\" : \"123\"\n } ]\n}"
101+
102+
103+
104+
105+
- request:
106+
method: POST
107+
uri: https://orgname.my.salesforce.com/services/data/v62.0/composite/sobjects
108+
body: '{"allOrNone": false, "records": [{"LastName": "Contact of Tom Cruise",
109+
"AccountId": "0019H00000H1RMDQA3", "attributes": {"type": "Contact"}}, {"LastName":
110+
"Contact of Bob the Builder", "AccountId": "0019H00000H1RMDQA3", "attributes":
111+
{"type": "Contact"}}, {"LastName": "Contact of SRK", "AccountId": "0019H00000H1RMDQA3",
112+
"attributes": {"type": "Contact"}}]}'
113+
headers: *id004
114+
response:
115+
status:
116+
code: 200
117+
message: OK
118+
headers: *id006
119+
body:
120+
string: "[ {\n \"id\" : \"0039H00000BbbFBQAZ\",\n \"success\" : true,\n \"errors\"
121+
: [ ]\n}, {\n \"id\" : \"0039H00000BbbFCQAZ\",\n \"success\" : true,\n \"errors\"
122+
: [ ]\n}, {\n \"id\" : \"0039H00000BbbFDQAZ\",\n \"success\" : true,\n \"errors\"
123+
: [ ]\n} ]"
124+
125+
126+
- request:
127+
method: GET
128+
uri: https://orgname.my.salesforce.com/services/data/v62.0/query/?q=SELECT%20Id%20FROM%20Account%20WHERE%20Name%20!=%20'Sample%20Account%20for%20Entitlements'%20LIMIT%205
129+
body: null
130+
headers: *id004
131+
response:
132+
status:
133+
code: 200
134+
message: OK
135+
headers: *id006
136+
body:
137+
string: "{\n \"totalSize\" : 5,\n \"done\" : true,\n \"records\" : [ {\n
138+
\ \"attributes\" : {\n \"type\" : \"Account\",\n \"url\" : \"/services/data/v62.0/sobjects/Account/0019H00000H1RMDQA3\"\n
139+
\ },\n \"Id\" : \"0019H00000H1RMDQA3\"\n }, {\n \"attributes\" :
140+
{\n \"type\" : \"Account\",\n \"url\" : \"/services/data/v62.0/sobjects/Account/0019H00000H1RMEQA3\"\n
141+
\ },\n \"Id\" : \"0019H00000H1RMDQA3\"\n }, {\n \"attributes\" :
142+
{\n \"type\" : \"Account\",\n \"url\" : \"/services/data/v62.0/sobjects/Account/0019H00000H1RMFQA3\"\n
143+
\ },\n \"Id\" : \"0019H00000H1RMDQA3\"\n }, {\n \"attributes\" :
144+
{\n \"type\" : \"Account\",\n \"url\" : \"/services/data/v62.0/sobjects/Account/0019H00000H1RMGQA3\"\n
145+
\ },\n \"Id\" : \"0019H00000H1RMDQA3\"\n }, {\n \"attributes\" :
146+
{\n \"type\" : \"Account\",\n \"url\" : \"/services/data/v62.0/sobjects/Account/0019H00000H1RMHQA3\"\n
147+
\ },\n \"Id\" : \"0019H00000H1RMDQA3\"\n } ]\n}"
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
version: 1
2+
interactions:
3+
- &id001
4+
include_file: GET_sobjects_Global_describe.yaml
5+
- &id002
6+
include_file: GET_sobjects_Account_describe.yaml
7+
- *id001
8+
- *id002
9+
- *id002
10+
11+
- &id003
12+
include_file: GET_sobjects_Contact_describe.yaml
13+
- *id001
14+
- *id003
15+
- *id003
16+
- &id007
17+
include_file: GET_sobjects_Opportunity_describe.yaml
18+
- *id002
19+
- &id008
20+
include_file: GET_sobjects_Lead_describe.yaml # Added interaction for Lead
21+
- *id001
22+
- &id009
23+
include_file: GET_sobjects_Event_describe.yaml # Added interaction for Event
24+
- *id001
25+
- *id008
26+
- *id001
27+
- *id009
28+
- *id001
29+
30+
- request:
31+
method: GET
32+
uri: https://orgname.my.salesforce.com/services/data/v62.0/limits/recordCount?sObjects=Account
33+
body: null
34+
headers: &id004
35+
Request-Headers:
36+
- Elided
37+
response:
38+
status:
39+
code: 200
40+
message: OK
41+
headers: &id006
42+
Content-Type:
43+
- application/json;charset=UTF-8
44+
Others: Elided
45+
body:
46+
string: "{\n \"sObjects\" : [ {\n \"count\" : 3,\n \"name\" : \"Account\"\n
47+
\ } ]\n}"
48+
49+
- request:
50+
method: GET
51+
uri: https://orgname.my.salesforce.com/services/data/v62.0/query/?q=SELECT%20Id,%20Name,%20Description,%20Phone,%20AccountNumber%20FROM%20Account%20WHERE%20Name%20!=%20'Sample%20Account%20for%20Entitlements'
52+
body: null
53+
headers: *id004
54+
response:
55+
status:
56+
code: 200
57+
message: OK
58+
headers: *id006
59+
body:
60+
string: "{\n \"totalSize\" : 10,\n \"done\" : true,\n \"records\" : [ {\n
61+
\ \"attributes\" : {\n \"type\" : \"Account\",\n \"url\" : \"/services/data/v62.0/sobjects/Account/0019H00000H1RMDQA3\"\n
62+
\ },\n \"Id\" : \"0019H00000H1RMDQA3\",\n \"Name\" : \"Tom Cruise\",\n
63+
\ \"Description\" : \"Some Description\",\n \"Phone\" : \"12345632\",\n
64+
\ \"AccountNumber\" : \"123\"\n }, {\n \"attributes\" : {\n \"type\"
65+
: \"Account\",\n \"url\" : \"/services/data/v62.0/sobjects/Account/0019H00000H1RMEQA3\"\n
66+
\ },\n \"Id\" : \"0019H00000H1RMEQA3\",\n \"Name\" : \"Bob The Builder\",\n
67+
\ \"Description\" : \"Some Description\",\n \"Phone\" : \"12345632\",\n
68+
\ \"AccountNumber\" : \"123\"\n }, {\n \"attributes\" : {\n \"type\"
69+
: \"Account\",\n \"url\" : \"/services/data/v62.0/sobjects/Account/0019H00000H1RMFQA3\"\n
70+
\ },\n \"Id\" : \"0019H00000H1RMFQA3\",\n \"Name\" : \"Shah Rukh Khan\",\n
71+
\ \"Description\" : \"Bollywood actor\",\n \"Phone\" : \"12345612\",\n
72+
\ \"AccountNumber\" : \"123\"\n }, {\n \"attributes\" : {\n \"type\"
73+
: \"Account\",\n \"url\" : \"/services/data/v62.0/sobjects/Account/0019H00000H1RMGQA3\"\n
74+
\ },\n \"Id\" : \"0019H00000H1RMGQA3\",\n \"Name\" : \"Aamir Khan\",\n
75+
\ \"Description\" : \"Mr perfectionist, bollywood actor\",\n \"Phone\"
76+
: \"12345623\",\n \"AccountNumber\" : \"123\"\n }, {\n \"attributes\"
77+
: {\n \"type\" : \"Account\",\n \"url\" : \"/services/data/v62.0/sobjects/Account/0019H00000H1RMHQA3\"\n
78+
\ },\n \"Id\" : \"0019H00000H1RMHQA3\",\n \"Name\" : \"Salman Khan\",\n
79+
\ \"Description\" : \"Mr perfectionist, bollywood actor\",\n \"Phone\"
80+
: \"12345623\",\n \"AccountNumber\" : \"123\"\n }, {\n \"attributes\"
81+
: {\n \"type\" : \"Account\",\n \"url\" : \"/services/data/v62.0/sobjects/Account/0019H00000H1UzyQAF\"\n
82+
\ },\n \"Id\" : \"0019H00000H1UzyQAF\",\n \"Name\" : \"Tom Cruise\",\n
83+
\ \"Description\" : \"Some Description\",\n \"Phone\" : \"12345632\",\n
84+
\ \"AccountNumber\" : \"123\"\n }, {\n \"attributes\" : {\n \"type\"
85+
: \"Account\",\n \"url\" : \"/services/data/v62.0/sobjects/Account/0019H00000H1UzzQAF\"\n
86+
\ },\n \"Id\" : \"0019H00000H1UzzQAF\",\n \"Name\" : \"Bob The Builder\",\n
87+
\ \"Description\" : \"Some Description\",\n \"Phone\" : \"12345632\",\n
88+
\ \"AccountNumber\" : \"123\"\n }, {\n \"attributes\" : {\n \"type\"
89+
: \"Account\",\n \"url\" : \"/services/data/v62.0/sobjects/Account/0019H00000H1V00QAF\"\n
90+
\ },\n \"Id\" : \"0019H00000H1V00QAF\",\n \"Name\" : \"Shah Rukh Khan\",\n
91+
\ \"Description\" : \"Bollywood actor\",\n \"Phone\" : \"12345612\",\n
92+
\ \"AccountNumber\" : \"123\"\n }, {\n \"attributes\" : {\n \"type\"
93+
: \"Account\",\n \"url\" : \"/services/data/v62.0/sobjects/Account/0019H00000H1V01QAF\"\n
94+
\ },\n \"Id\" : \"0019H00000H1V01QAF\",\n \"Name\" : \"Aamir Khan\",\n
95+
\ \"Description\" : \"Mr perfectionist, bollywood actor\",\n \"Phone\"
96+
: \"12345623\",\n \"AccountNumber\" : \"123\"\n }, {\n \"attributes\"
97+
: {\n \"type\" : \"Account\",\n \"url\" : \"/services/data/v62.0/sobjects/Account/0019H00000H1V02QAF\"\n
98+
\ },\n \"Id\" : \"0019H00000H1V02QAF\",\n \"Name\" : \"Salman Khan\",\n
99+
\ \"Description\" : \"Mr perfectionist, bollywood actor\",\n \"Phone\"
100+
: \"12345623\",\n \"AccountNumber\" : \"123\"\n } ]\n}"
101+
102+
103+
104+
105+
- request:
106+
method: POST
107+
uri: https://orgname.my.salesforce.com/services/data/v62.0/composite/sobjects
108+
body: '{"allOrNone": false, "records": [{"LastName": "Contact of Tom Cruise",
109+
"AccountId": "0019H00000H1RMDQA3", "attributes": {"type": "Contact"}}, {"LastName":
110+
"Contact of Bob the Builder", "AccountId": "0019H00000H1RMEQA3", "attributes":
111+
{"type": "Contact"}}, {"LastName": "Contact of SRK", "AccountId": "0019H00000H1RMFQA3",
112+
"attributes": {"type": "Contact"}}]}'
113+
headers: *id004
114+
response:
115+
status:
116+
code: 200
117+
message: OK
118+
headers: *id006
119+
body:
120+
string: "[ {\n \"id\" : \"0039H00000BbbFBQAZ\",\n \"success\" : true,\n \"errors\"
121+
: [ ]\n}, {\n \"id\" : \"0039H00000BbbFCQAZ\",\n \"success\" : true,\n \"errors\"
122+
: [ ]\n}, {\n \"id\" : \"0039H00000BbbFDQAZ\",\n \"success\" : true,\n \"errors\"
123+
: [ ]\n} ]"

0 commit comments

Comments
 (0)