mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
Pass database key into LifecycleManager.
This commit is contained in:
@@ -27,6 +27,7 @@ import org.junit.Test;
|
||||
import java.io.File;
|
||||
import java.util.Collection;
|
||||
|
||||
import static org.briarproject.bramble.test.TestUtils.getSecretKey;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
@@ -53,10 +54,8 @@ public class FeedManagerIntegrationTest extends BriarTestCase {
|
||||
LocalAuthor localAuthor = identityManager.createLocalAuthor("feedTest");
|
||||
identityManager.registerLocalAuthor(localAuthor);
|
||||
|
||||
component.getAccountManager().createAccount("password");
|
||||
|
||||
lifecycleManager = component.getLifecycleManager();
|
||||
lifecycleManager.startServices();
|
||||
lifecycleManager.startServices(getSecretKey());
|
||||
lifecycleManager.waitForStartup();
|
||||
|
||||
feedManager = component.getFeedManager();
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package org.briarproject.briar.feed;
|
||||
|
||||
import org.briarproject.bramble.account.AccountModule;
|
||||
import org.briarproject.bramble.api.account.AccountManager;
|
||||
import org.briarproject.bramble.api.identity.IdentityManager;
|
||||
import org.briarproject.bramble.api.lifecycle.LifecycleManager;
|
||||
import org.briarproject.bramble.client.ClientModule;
|
||||
@@ -38,7 +36,6 @@ import dagger.Component;
|
||||
TestSecureRandomModule.class,
|
||||
TestSocksModule.class,
|
||||
TestDnsModule.class,
|
||||
AccountModule.class,
|
||||
BriarClientModule.class,
|
||||
ClientModule.class,
|
||||
ContactModule.class,
|
||||
@@ -82,8 +79,6 @@ interface FeedManagerIntegrationTestComponent {
|
||||
|
||||
IdentityManager getIdentityManager();
|
||||
|
||||
AccountManager getAccountManager();
|
||||
|
||||
LifecycleManager getLifecycleManager();
|
||||
|
||||
FeedManager getFeedManager();
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package org.briarproject.briar.introduction;
|
||||
|
||||
import org.briarproject.bramble.account.AccountModule;
|
||||
import org.briarproject.bramble.client.ClientModule;
|
||||
import org.briarproject.bramble.contact.ContactModule;
|
||||
import org.briarproject.bramble.crypto.CryptoExecutorModule;
|
||||
@@ -37,7 +36,6 @@ import dagger.Component;
|
||||
TestDatabaseModule.class,
|
||||
TestPluginConfigModule.class,
|
||||
TestSecureRandomModule.class,
|
||||
AccountModule.class,
|
||||
BlogModule.class,
|
||||
BriarClientModule.class,
|
||||
ClientModule.class,
|
||||
|
||||
@@ -103,11 +103,9 @@ public class SimplexMessagingIntegrationTest extends BriarTestCase {
|
||||
// Add an identity for the user
|
||||
IdentityManager identityManager = device.getIdentityManager();
|
||||
identityManager.registerLocalAuthor(local);
|
||||
// Create an account
|
||||
device.getAccountManager().createAccount("password");
|
||||
// Start the lifecycle manager
|
||||
LifecycleManager lifecycleManager = device.getLifecycleManager();
|
||||
lifecycleManager.startServices();
|
||||
lifecycleManager.startServices(getSecretKey());
|
||||
lifecycleManager.waitForStartup();
|
||||
// Add the other user as a contact
|
||||
ContactManager contactManager = device.getContactManager();
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package org.briarproject.briar.messaging;
|
||||
|
||||
import org.briarproject.bramble.account.AccountModule;
|
||||
import org.briarproject.bramble.api.account.AccountManager;
|
||||
import org.briarproject.bramble.api.contact.ContactManager;
|
||||
import org.briarproject.bramble.api.event.EventBus;
|
||||
import org.briarproject.bramble.api.identity.IdentityManager;
|
||||
@@ -41,7 +39,6 @@ import dagger.Component;
|
||||
TestDatabaseModule.class,
|
||||
TestPluginConfigModule.class,
|
||||
TestSecureRandomModule.class,
|
||||
AccountModule.class,
|
||||
BriarClientModule.class,
|
||||
ClientModule.class,
|
||||
ContactModule.class,
|
||||
@@ -80,8 +77,6 @@ interface SimplexMessagingIntegrationTestComponent {
|
||||
|
||||
IdentityManager getIdentityManager();
|
||||
|
||||
AccountManager getAccountManager();
|
||||
|
||||
ContactManager getContactManager();
|
||||
|
||||
MessagingManager getMessagingManager();
|
||||
|
||||
@@ -140,9 +140,6 @@ public abstract class BriarIntegrationTest<C extends BriarIntegrationTestCompone
|
||||
assertTrue(testDir.mkdirs());
|
||||
createComponents();
|
||||
|
||||
c0.getAccountManager().createAccount("password");
|
||||
c1.getAccountManager().createAccount("password");
|
||||
c2.getAccountManager().createAccount("password");
|
||||
identityManager0 = c0.getIdentityManager();
|
||||
identityManager1 = c1.getIdentityManager();
|
||||
identityManager2 = c2.getIdentityManager();
|
||||
@@ -196,9 +193,9 @@ public abstract class BriarIntegrationTest<C extends BriarIntegrationTestCompone
|
||||
lifecycleManager0 = c0.getLifecycleManager();
|
||||
lifecycleManager1 = c1.getLifecycleManager();
|
||||
lifecycleManager2 = c2.getLifecycleManager();
|
||||
lifecycleManager0.startServices();
|
||||
lifecycleManager1.startServices();
|
||||
lifecycleManager2.startServices();
|
||||
lifecycleManager0.startServices(getSecretKey());
|
||||
lifecycleManager1.startServices(getSecretKey());
|
||||
lifecycleManager2.startServices(getSecretKey());
|
||||
lifecycleManager0.waitForStartup();
|
||||
lifecycleManager1.waitForStartup();
|
||||
lifecycleManager2.waitForStartup();
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package org.briarproject.briar.test;
|
||||
|
||||
import org.briarproject.bramble.account.AccountModule;
|
||||
import org.briarproject.bramble.api.account.AccountManager;
|
||||
import org.briarproject.bramble.api.client.ClientHelper;
|
||||
import org.briarproject.bramble.api.contact.ContactManager;
|
||||
import org.briarproject.bramble.api.db.DatabaseComponent;
|
||||
@@ -56,7 +54,6 @@ import dagger.Component;
|
||||
TestDatabaseModule.class,
|
||||
TestPluginConfigModule.class,
|
||||
TestSecureRandomModule.class,
|
||||
AccountModule.class,
|
||||
BlogModule.class,
|
||||
BriarClientModule.class,
|
||||
ClientModule.class,
|
||||
@@ -123,8 +120,6 @@ public interface BriarIntegrationTestComponent {
|
||||
|
||||
IdentityManager getIdentityManager();
|
||||
|
||||
AccountManager getAccountManager();
|
||||
|
||||
ClientHelper getClientHelper();
|
||||
|
||||
ContactManager getContactManager();
|
||||
|
||||
Reference in New Issue
Block a user