|
1 | 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP |
2 | 2 |
|
3 | | -exports[`impliedPrice with endpoint computedPrice erroring calls returns error if not reaching minAnswers 1`] = ` |
| 3 | +exports[`impliedPrice with endpoint computedPrice erroring calls returns error if not enough configured sources to reach minAnswers 1`] = ` |
| 4 | +{ |
| 5 | + "error": { |
| 6 | + "feedID": "{"data":{"endpoint":"computedPrice","operand1Sources":["coingecko","not_configured_1","not_configured_2"],"operand1MinAnswers":2,"operand2Sources":["coingecko"],"operand1Input":{"from":"LINK","to":"USD"},"operand2Input":{"from":"ETH","to":"USD"},"operation":"divide"}}", |
| 7 | + "message": "Not enough sources configured. Make sure 1 of the following are set in the environment: NOT_CONFIGURED_1_ADAPTER_URL, NOT_CONFIGURED_2_ADAPTER_URL", |
| 8 | + "name": "AdapterError", |
| 9 | + }, |
| 10 | + "jobRunID": "1", |
| 11 | + "status": "errored", |
| 12 | + "statusCode": 500, |
| 13 | +} |
| 14 | +`; |
| 15 | + |
| 16 | +exports[`impliedPrice with endpoint computedPrice erroring calls returns error if not enough sources to reach minAnswers 1`] = ` |
4 | 17 | { |
5 | 18 | "error": { |
6 | 19 | "feedID": "{"data":{"endpoint":"computedPrice","operand1Sources":["coingecko"],"operand1MinAnswers":2,"operand2Sources":["coingecko"],"operand1Input":{"from":"LINK","to":"USD"},"operand2Input":{"from":"ETH","to":"USD"},"operation":"divide"}}", |
| 20 | + "message": "Not enough sources: got 1 sources, requiring at least 2 answers", |
| 21 | + "name": "AdapterError", |
| 22 | + }, |
| 23 | + "jobRunID": "1", |
| 24 | + "status": "errored", |
| 25 | + "statusCode": 400, |
| 26 | +} |
| 27 | +`; |
| 28 | + |
| 29 | +exports[`impliedPrice with endpoint computedPrice erroring calls returns error if not reaching minAnswers 1`] = ` |
| 30 | +{ |
| 31 | + "error": { |
| 32 | + "feedID": "{"data":{"endpoint":"computedPrice","operand1Sources":["coingecko","failing"],"operand1MinAnswers":2,"operand2Sources":["coingecko"],"operand1Input":{"from":"LINK","to":"USD"},"operand2Input":{"from":"ETH","to":"USD"},"operation":"divide"}}", |
7 | 33 | "message": "Not returning median: got 1 answers, requiring min. 2 answers", |
8 | 34 | "name": "AdapterError", |
9 | 35 | }, |
@@ -91,8 +117,8 @@ exports[`impliedPrice with endpoint computedPrice validation error returns a val |
91 | 117 | { |
92 | 118 | "error": { |
93 | 119 | "feedID": "{"data":{"endpoint":"computedPrice","operand1Sources":["NOT_REAL"],"operand2Sources":["coingecko"],"operand1Input":{"from":"LINK","to":"USD"},"operand2Input":{"from":"ETH","to":"USD"},"operation":"divide"}}", |
94 | | - "message": "Please set the required env NOT_REAL_ADAPTER_URL.", |
95 | | - "name": "RequiredEnvError", |
| 120 | + "message": "Not enough sources configured. Make sure 1 of the following are set in the environment: NOT_REAL_ADAPTER_URL", |
| 121 | + "name": "AdapterError", |
96 | 122 | }, |
97 | 123 | "jobRunID": "1", |
98 | 124 | "status": "errored", |
@@ -178,10 +204,36 @@ exports[`impliedPrice with endpoint impliedPrice erroring calls returns error if |
178 | 204 | } |
179 | 205 | `; |
180 | 206 |
|
181 | | -exports[`impliedPrice with endpoint impliedPrice erroring calls returns error if not reaching minAnswers 1`] = ` |
| 207 | +exports[`impliedPrice with endpoint impliedPrice erroring calls returns error if not enough configured sources to reach minAnswers 1`] = ` |
| 208 | +{ |
| 209 | + "error": { |
| 210 | + "feedID": "{"data":{"endpoint":"impliedPrice","dividendSources":["coingecko","not_configured_1","not_configured_2"],"dividendMinAnswers":2,"divisorSources":["coingecko"],"dividendInput":{"from":"LINK","to":"USD"},"divisorInput":{"from":"ETH","to":"USD"}}}", |
| 211 | + "message": "Not enough sources configured. Make sure 1 of the following are set in the environment: NOT_CONFIGURED_1_ADAPTER_URL, NOT_CONFIGURED_2_ADAPTER_URL", |
| 212 | + "name": "AdapterError", |
| 213 | + }, |
| 214 | + "jobRunID": "1", |
| 215 | + "status": "errored", |
| 216 | + "statusCode": 500, |
| 217 | +} |
| 218 | +`; |
| 219 | + |
| 220 | +exports[`impliedPrice with endpoint impliedPrice erroring calls returns error if not enough sources to reach minAnswers 1`] = ` |
182 | 221 | { |
183 | 222 | "error": { |
184 | 223 | "feedID": "{"data":{"endpoint":"impliedPrice","dividendSources":["coingecko"],"dividendMinAnswers":2,"divisorSources":["coingecko"],"dividendInput":{"from":"LINK","to":"USD"},"divisorInput":{"from":"ETH","to":"USD"}}}", |
| 224 | + "message": "Not enough sources: got 1 sources, requiring at least 2 answers", |
| 225 | + "name": "AdapterError", |
| 226 | + }, |
| 227 | + "jobRunID": "1", |
| 228 | + "status": "errored", |
| 229 | + "statusCode": 400, |
| 230 | +} |
| 231 | +`; |
| 232 | + |
| 233 | +exports[`impliedPrice with endpoint impliedPrice erroring calls returns error if not reaching minAnswers 1`] = ` |
| 234 | +{ |
| 235 | + "error": { |
| 236 | + "feedID": "{"data":{"endpoint":"impliedPrice","dividendSources":["coingecko","failing"],"dividendMinAnswers":2,"divisorSources":["coingecko"],"dividendInput":{"from":"LINK","to":"USD"},"divisorInput":{"from":"ETH","to":"USD"}}}", |
185 | 237 | "message": "Not returning median: got 1 answers, requiring min. 2 answers", |
186 | 238 | "name": "AdapterError", |
187 | 239 | }, |
@@ -219,8 +271,8 @@ exports[`impliedPrice with endpoint impliedPrice validation error returns a vali |
219 | 271 | { |
220 | 272 | "error": { |
221 | 273 | "feedID": "{"data":{"endpoint":"impliedPrice","dividendSources":["NOT_REAL"],"divisorSources":["coingecko"],"dividendInput":{"from":"LINK","to":"USD"},"divisorInput":{"from":"ETH","to":"USD"}}}", |
222 | | - "message": "Please set the required env NOT_REAL_ADAPTER_URL.", |
223 | | - "name": "RequiredEnvError", |
| 274 | + "message": "Not enough sources configured. Make sure 1 of the following are set in the environment: NOT_REAL_ADAPTER_URL", |
| 275 | + "name": "AdapterError", |
224 | 276 | }, |
225 | 277 | "jobRunID": "1", |
226 | 278 | "status": "errored", |
|
0 commit comments