Rename getOnionAddress() to getBaseUrl()

This can later include a version parameter as well.
This commit is contained in:
Torsten Grote
2022-02-17 14:18:07 -03:00
parent 653b744a02
commit 88c54ed3b0
7 changed files with 20 additions and 18 deletions

View File

@@ -131,7 +131,7 @@ public class MailboxIntegrationTest extends BrambleTestCase {
ContactId contactId = new ContactId(1);
MailboxContact contact = getMailboxContact(contactId);
MailboxProperties contactProperties = new MailboxProperties(
ownerProperties.getOnionAddress(), contact.token, false);
ownerProperties.getBaseUrl(), contact.token, false);
api.addContact(ownerProperties, contact);
// upload a file for our contact

View File

@@ -44,15 +44,16 @@ public class MailboxPairingTaskImplTest extends BrambleMockTestCase {
private final String onion = getRandomString(64);
private final byte[] onionBytes = getRandomBytes(32);
private final String onionAddress = "http://" + onion + ".onion";
private final MailboxAuthToken setupToken =
new MailboxAuthToken(getRandomId());
private final MailboxAuthToken ownerToken =
new MailboxAuthToken(getRandomId());
private final String validPayload = getValidPayload();
private final MailboxProperties setupProperties =
new MailboxProperties(onion, setupToken, true);
new MailboxProperties(onionAddress, setupToken, true);
private final MailboxProperties ownerProperties =
new MailboxProperties(onion, ownerToken, true);
new MailboxProperties(onionAddress, ownerToken, true);
@Test
public void testInitialQrCodeReceivedState() {
@@ -180,7 +181,7 @@ public class MailboxPairingTaskImplTest extends BrambleMockTestCase {
private PredicateMatcher<MailboxProperties> matches(MailboxProperties p2) {
return new PredicateMatcher<>(MailboxProperties.class, p1 ->
p1.getAuthToken().equals(p2.getAuthToken()) &&
p1.getOnionAddress().equals(p2.getOnionAddress()) &&
p1.getBaseUrl().equals(p2.getBaseUrl()) &&
p1.isOwner() == p2.isOwner());
}

View File

@@ -73,7 +73,7 @@ public class MailboxSettingsManagerImplTest extends BrambleMockTestCase {
MailboxProperties properties = manager.getOwnMailboxProperties(txn);
assertNotNull(properties);
assertEquals(onion, properties.getOnionAddress());
assertEquals(onion, properties.getBaseUrl());
assertEquals(token, properties.getAuthToken());
assertTrue(properties.isOwner());
}