GODT-1657: More stable sync, with some tests

This commit is contained in:
James Houlahan
2022-10-09 23:05:52 +02:00
parent e7526f2e78
commit 509a767e50
41 changed files with 883 additions and 779 deletions

View File

@ -24,7 +24,7 @@ type testCtx struct {
// These are the objects supporting the test.
dir string
api API
dialer *bridge.TestDialer
netCtl *liteapi.NetCtl
locator *locations.Locations
storeKey []byte
version *semver.Version
@ -76,15 +76,13 @@ type smtpClient struct {
func newTestCtx(tb testing.TB) *testCtx {
dir := tb.TempDir()
dialer := bridge.NewTestDialer()
ctx := &testCtx{
dir: dir,
api: newFakeAPI(),
dialer: dialer,
netCtl: liteapi.NewNetCtl(),
locator: locations.New(bridge.NewTestLocationsProvider(dir), "config-name"),
storeKey: []byte("super-secret-store-key"),
mocks: bridge.NewMocks(tb, dialer, defaultVersion, defaultVersion),
mocks: bridge.NewMocks(tb, defaultVersion, defaultVersion),
version: defaultVersion,
userIDByName: make(map[string]string),