GODT-1815: Start without internet, load users later

This commit is contained in:
James Houlahan
2022-09-27 12:02:28 +02:00
parent 1da1188351
commit 612fb7ad7b
16 changed files with 243 additions and 175 deletions

View File

@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
"time"
"github.com/ProtonMail/gluon/rfc822"
"github.com/bradenaw/juniper/xslices"
@ -182,6 +183,14 @@ func (s *scenario) userIsListedAndConnected(username string) error {
return nil
}
func (s *scenario) userIsEventuallyListedAndConnected(username string) error {
return eventually(
func() error { return s.userIsListedAndConnected(username) },
5*time.Second,
100*time.Millisecond,
)
}
func (s *scenario) userIsListedButNotConnected(username string) error {
user, err := s.t.bridge.GetUserInfo(s.t.getUserID(username))
if err != nil {