Include mailbox server versions in MailboxStatus

so we know if the mailbox is incompatible with Briar
This commit is contained in:
Torsten Grote
2022-05-27 09:45:51 -03:00
parent b161a5e115
commit 0f4aa8027a
4 changed files with 62 additions and 13 deletions

View File

@@ -146,12 +146,17 @@ public class MailboxSettingsManagerImplTest extends BrambleMockTestCase {
@Test
public void testRecordsSuccess() throws Exception {
Transaction txn = new Transaction(null, false);
Settings oldSettings = new Settings();
oldSettings
.putIntArray(SETTINGS_KEY_SERVER_SUPPORTS, serverSupportsInts);
Settings expectedSettings = new Settings();
expectedSettings.putLong(SETTINGS_KEY_LAST_ATTEMPT, now);
expectedSettings.putLong(SETTINGS_KEY_LAST_SUCCESS, now);
expectedSettings.putInt(SETTINGS_KEY_ATTEMPTS, 0);
context.checking(new Expectations() {{
oneOf(settingsManager).getSettings(txn, SETTINGS_NAMESPACE);
will(returnValue(oldSettings));
oneOf(settingsManager).mergeSettings(txn, expectedSettings,
SETTINGS_NAMESPACE);
}});