Commit Graph

51 Commits

Author SHA1 Message Date
Jordan Rose
30adb219d6 Recognize destinationUuid on envelopes, and filter out non-ACI
We're very close to being able to decrypt messages sent to our PNI,
but *until* that point it's best to just drop any such messages. This
should make testing easier.
2022-03-18 14:15:00 -07:00
Jordan Rose
49d4684013 Teach OWSIdentityManager about PNI identity keys
And make all callers explicitly say which one they want (which for now
is always the ACI identity key).
2022-03-16 13:29:20 -07:00
Jordan Rose
310638ad78 Fix MessageProcessingIntegrationTest database expectations
These tests fulfill an expectation when a write to the database causes
the desired state to be reached. However, there may still be writes to
the database in flight, and the *next* write will *also* probably be
in the desired state, resulting in the expectation being fulfilled
again. Because this happened *after* the test finished, an exception
was thrown, the test environment terminated, and the *next* test (or
possibly a later one) was being blamed for the failure.

Fix this issue in both places where it happens by allowing multiple
fulfills, and re-enable the test that was previously getting blamed
for this.
2022-02-03 09:44:11 -08:00
Michelle Linington
e6e09c83e7 Disable broken test 2022-02-01 10:23:40 -08:00
Michelle Linington
2559fa8bb4 Disable broken test 2022-02-01 10:14:51 -08:00
Matthew Chen
997f354f74 Only warn in logs when duplicate decryptions occur. 2021-09-28 17:22:17 -03:00
Matthew Chen
fc45ec8f63 Refine de-duplication logic. 2021-09-24 18:30:42 -03:00
Michelle Linington
6cb440dc26 Fix tests 2021-09-23 09:56:02 -03:00
Michelle Linington
a9121b9ea3 Fix test compilation 2021-09-23 09:56:02 -03:00
Matthew Chen
4df6394564 Fix broken tests. 2021-09-20 17:51:16 -03:00
Matthew Chen
fcdca12cf5 Deprecate REST, Part 1
* Port socket manager to Swift.
* Clean up HTTP request success/failure state & errors.
* Rework network manager.
* Rework HTTP errors.
* Rework errors "properties": isRetryable, etc.
* Fix test breakage.
2021-08-18 14:25:36 -03:00
Matthew Chen
f2b76e60f9 Refine names. 2021-07-02 22:08:53 -03:00
Matthew Chen
8b73e93be2 Remove uiRead(). 2021-07-02 22:04:58 -03:00
Matthew Chen
f06b72bc2a Remove uiRead(). 2021-07-02 22:04:58 -03:00
Matthew Chen
f65d6e8e2d Remove uiRead(). 2021-07-02 22:04:58 -03:00
Matthew Chen
86b8eb08b8 Remove YapDatabase.
Apply asset from design.

Fix rebase breakage.
2021-03-25 11:41:16 -03:00
Matthew Chen
d0cbf8cfd0 Rework dependency access. 2021-03-25 09:24:27 -03:00
Nora Trapp
5f8f048202 Fix tests 2021-02-23 10:45:50 -08:00
Nora Trapp
91d2953843 Begone OWSMessageReceiver 2021-02-23 10:45:50 -08:00
Nora Trapp
3991802fa8 Add appropriate restrictions to when message processing can run. 2021-02-23 10:45:50 -08:00
Nora Trapp
ad6583facb Eliminate usage of decrypt job queue 2021-02-23 10:45:50 -08:00
Jordan Rose
07c20a5f6f Rename the SignalClient test protocol to avoid conflicts 2021-01-28 12:03:50 -08:00
Matthew Chen
b13ff0c879 Respond to CR. 2020-10-08 17:31:29 -03:00
Matthew Chen
fa96fecdcf Fix spurious test failures. 2020-09-17 17:30:38 -03:00
Nora Trapp
18e19088a5 Fix broken tests 2020-08-28 13:10:47 -07:00
Matthew Chen
4c6f2c22b4 Use protocol contexts in prekey stores. 2020-08-25 21:31:56 -03:00
Matthew Chen
fdd3c513ca Rework Groups v2 & CDS feature flags. 2020-08-11 17:45:04 -03:00
Matthew Chen
154805cf68 Fix broken tests. 2020-06-23 10:04:39 -03:00
Matthew Chen
3cedd3ccdf Overhaul database observation. 2020-06-18 09:28:49 -03:00
Nora Trapp
22f7298654 Fix tests 2020-06-01 13:07:56 -07:00
Nora Trapp
5c976b0acd PR Feedback 2020-03-16 16:30:58 -07:00
Nora Trapp
72842e094d Disable some tests temporarily 2020-03-14 15:40:02 -07:00
Michael Kirk
329fffb8e2 Fixing up phonenumber parsing tests 2019-10-25 18:33:56 -07:00
Matthew Chen
f56aae7ac9 Merge remote-tracking branch 'private/release/2.43.0'
# Conflicts:
#	SignalServiceKit/src/Util/FeatureFlags.swift
#	SignalServiceKit/tests/Storage/SDSDatabaseStorageObservationTest.swift
2019-09-16 14:41:22 -03:00
Michael Kirk
b0f9b55561 Fix test that previously had static text 2019-09-16 07:51:36 -07:00
Matthew Chen
3ff3f9bb0d Fix tests. 2019-09-16 10:00:26 -03:00
Michael Kirk
53b2fc1929 touches take effect even in a no-op deferred transaction.
UIDatabaseObserver orchestrates notifying views when a transaction commits.
We back UIDatabaseObserver with a DatabaseRegionObserver

DatabaseRegionObservers are not notified if the transaction contains no changes:

    https://github.com/groue/GRDB.swift/blob/af0ac15/GRDB/Core/DatabaseRegionObservation.swift#L119

However the more general TransactionObservers *are* notified even if the
transaction contains no changes. Nicely, GRDB does some work to ensure this is
true even in the event of a deferred transaction. See this comment on `databaseDidCommitEmptyDeferredTransaction`

da459386a0/GRDB/Core/TransactionObserver.swift (L444)
2019-09-04 21:47:57 -06:00
Michael Kirk
6eb1595e87 update GRDB 2019-09-04 18:23:01 -06:00
Michael Kirk
377632f7eb Sending perf test - baseline 2019-09-04 18:21:40 -06:00
Matthew Chen
db2dacf45f Fix more tests. 2019-08-21 15:01:13 -03:00
Matthew Chen
3a388d9bb3 Respond to CR. 2019-08-21 10:20:07 -03:00
Matthew Chen
386e443ce1 Fix more tests. 2019-08-21 10:20:07 -03:00
Michael Kirk
a89baa670e DeliveryStateMap vs. Address 2019-07-10 19:43:10 -06:00
Nora Trapp
3c33f276f7 Maintain a SignalServiceAddress cache to allow for isEqual implementation 2019-07-10 13:27:36 -07:00
Nora Trapp
d469f9c540 Fix some typos 2019-07-02 11:19:50 -07:00
Michael Kirk
efafd6fb38 Create UUID message in DebugUI, rendering in homeview
ContactAvatarBuilder works with SignalServiceAddress

Currently this only functions with the GRDB adapter. There are other asserts
triggered in yap extensions.
2019-07-01 10:16:23 -06:00
Michael Kirk
0c944fe9f4 Incoming message has authorAddress 2019-06-27 14:22:13 -06:00
Nora Trapp
7d94af3287 Migrate TSContactThread to support UUIDs 2019-06-27 13:12:52 -07:00
Michael Kirk
0907a2257f Convert Recipient and SessionStore to SignalServiceAddress 2019-06-26 17:48:16 -06:00
Michael Kirk
c34b21fa6a TSAccountManager holds uuid and red test for UUID work 2019-06-24 10:19:46 -06:00