Commit 7f22bf8
test: make some tests fast and independent of real backend (#579)
* test: make some tests fast and independent of real backend
Some tests rely on random() and Date, which need to be rewritten. The revised
tests are moved forward to prevent being affected by global states from other
tests.
* test: ignore more headers when matching requests
Some of those headers may be affected by Node versions.
* test: ignore headers when matching requests
* test: update request logs
* test: use deterministic username
* test: make request reply more stable
* test: add test:real for testing with real backend
* test: use replay for user-related tests
* test: use log replay for leaderboard tests
* test: log replay for status tests
* test: support setting server URL suffix
* test: remove Travis CI env override
* test: use pollyjs for ACL tests
* test: make cache test faster
* test: use polly for conversation test
* test: use pollyjs for role tests
* test: only test file API when using real backend1 parent 8d42c68 commit 7f22bf8
File tree
148 files changed
+66283
-173
lines changed- recordings
- AV-Cloud_4059047921
- -getServerDate_3861860821/should-return-a-date-_3033254009
- -rpc_2399869033
- receive-array-of-AVObjects_3617734733
- receive-bare-AVObject_2209367706
- receive-complex-object_427351593
- send-AVObject_366179365
- send-bare-AVObject_2666081587
- AV-Status_182513154
- Query-statuses-_3829896703
- should-not-cause-URI-too-long_857544070
- should-reset-unread-statuses-_3611373772
- should-return-private-statuses-_654498159
- should-return-published-statuses-_2464967190
- should-return-unread-count-_2709918790
- should-return-unread-count-that-is-greater-than-zero-_1427996684
- Send-status-_3868217483
- should-send-private-status-to-an-user-_2182658328
- should-send-status-to-a-female-user-_4070335779
- should-send-status-to-followers-_1653702374
- Status-guide-test-_197092205/should-follow_20583307/unfollow-successfully-_2639136222
- Conversation_2640583206
- -broadcast_4209827445/should-broadcast-a-message-to-all-clients-with-current-conversation_3412507037
- -save_2867845407/should-create-a-realtime-conversation_2600615093
- -send_1543326976
- should-send-a-realtime-message-to-the-conversation_3245344578
- should-send-a-realtime-message-to-the-system-conversation_1406045071
- Geopoints_1459669221
- near_1425233679
- save-object-with-geopoints_2892866483
- Leaderboard_3275071436
- Statistics_2658119722
- count_967958004
- delete-statistics_147177321
- get-results-around-a-specified-user_3745100926
- get-results-around-user_2016320561
- get-statistics_1972767578
- getResults_1632843303
- include-a-non-exist-statistic-should-throw_1253811762
- shoud-have-properties_2344979797
- getArchives_881889484
- mutation-1-with-masterKey_1386815290
- mutation-2-with-masterKey_2430815065
- mutation-by-client-should-be-rejected_2328768432
- query_4174280163
- shoud-have-properties_2344979797
- ObjectACL_686985374/set-and-fetch-acl_477705090
- Objects_136869387
- -Saving-Objects_734425844
- should-crate-a-Object_1252906117
- should-create-a-User_2344521204
- should-create-another-Object_3488117680
- Array-Data_43804130
- accept-array-param_460166929
- addUnique_624757339
- add_993596020
- remove_3683784189
- Bit-operations_633833390
- bit-and_1788825609
- bit-or_2656474989
- bit-xor_2267708325
- Deleting-Objects_1626626437/should-delete-object_1537042592
- Fetching-Objects_1241673741
- fetch-should-remove-deleted-keys_1235015609
- fetchAll-with-non-existed-Class_1732774206/object-should-fail_3925781535
- fetchAll_2292446774
- fetch_2910765027
- Relational-Data_1128359924
- fetchOptions-keys_2424158557
- should-compatible-with-previous-include-option-of-fetch_3234965851
- should-create-a-Person_3530769578
- should-create-many-to-many-relations_1407352012
- should-fetch-include-authors-successfully_548451651
- should-fetch-when-save-when-creating-new-object-_2919684681
- should-fetch-when-save_592982047
- should-query-relational-data_3369127417
- should-save-all-partially_2114313946
- should-save-all-successfully_2711275917
- should-set-relation-_570108726
- Retrieving-Objects_2244900730/should-be-the-just-save-Object_3889513002
- Updating-Objects_3413221323
- should-not-update-prop-when-query-not-match_211364035
- should-update-prop-when-query-match_1479817141
- should-update-prop_1422992344
- Queries_842530531
- -Basic-Queries_2120137160
- should-return-Class-Array_2034830301
- should-return-TestClass_3615366676
- should-throw-when-object-not-exists_3742366688
- -File-Query_3474564568
- -cloudQuery_1998416685
- should-return-count-value-_1336084012
- should-return-count-value-too-_2597229118
- should-return-limited-results-_4046762198
- should-return-results-_1029991224
- should-return-syntax-error-_1626848969
- All-Files_3339381387/should-return-AV-File-Object-list_834687804
- All-User_2070679183/should-return-AV-User-Object-list_1328405593
- Compound-Query_632679536
- should-satisfy-on-and-conditions_1689265471
- should-satisfy-on-or-conditions_2078682385
- Counts_2261259173/should-return-num_2552064632
- Query-Constraints_3042071231
- basic_87360061
- containsAll-with-an-large-array-should-not-cause-URI-too-long_1886922003
- include-with-multi-params_3387938594
- includeACL_153220253
- include_1968798311
- param-check_3351637078
- select-with-multi-params_3146310132
- select_297952813
- sizeEqualTo_1056335421
- Query-with-different-condtions_1390618707/query-doncition-with-array_1620466613
- Relational-Queries_3507322460/should-return-relation-count_2835530171
- destroyAll_418999268/should-be-deleted_943263470
- scan_3974641896/should-works_2009598512
- Role_2418769465/constructor_4066221903/acl-is-required_3763596966
- User_3768991250
- Associations_1760271453/return-post-relation-to-user_948600757
- Current-User_1380399265
- current-_4079961613
- currentAsync-_4006155249
- User-getRoles_2840946038/Should-get-the-current-user-s-role_30030259
- User-logIn-and-User-become_1707829842
- should-fail-with-wrong-password_995446848
- should-loginWithEmail_2640516273
- should-login_817989515
- User-loginAnonymously_1844780739
- create-an-anonymous-user-and-then-associateWithAuthData_411731184
- create-an-anonymous-user-and-then-signup_4063588952
- User-signUp_2418928912
- should-sign-up_2537997332
- should-throw-when-required-field-missing_2393193183
- associate-with-authData_3638344631/logIn-an-user-and-associate-with-authData_2872736161
- authData-and-unionId_3520550132
- failOnNotExist_3834259720
- should-login-as-the-same-user_1314336463
- authenticated_3520222456
- authenticated-_3192898843
- isAuthenticated_2942338952
- currentUser-isAuthenticated-_625895223
- outdated-sessionToken_2526954518
- user-isAuthenticated-_3902894676
- currentUser-disabled_1568416055/User_3768991250
- existing-user_3495910359
- Update-user-password_3119043600/should-update-password_2946486776
- User-query_1077910714/should-return-conditoinal-users_3844284628
- User-update_226365055/shoud-update-name_2931045486
- fetch-User_3200994950/should-resolve-promise_2205418555
- refreshSessionToken_403527525/User-refreshSessionToken_2206618895
- hooks_2679941595
- Object-destroyAll_2713433654
- Object-destroy_3257794531
- Object-save-modify-children-_395790374
- Object-save-new-object-_4054548722
- Object-save-new-object-disableBeforeHook_1351232110
- Object-save-new-object-ignore-afterSave_3895694271
- Object-save-update-object-_2416096873
- Object-save-update-object-disableAfterHook_1726024070
- Object-saveAll_4023780288
- src
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
148 files changed
+66283
-173
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | 7 | | |
17 | 8 | | |
18 | 9 | | |
| |||
0 commit comments