diff --git a/internal/api/client.go b/internal/api/client.go index d3cfd67..5d69d96 100644 --- a/internal/api/client.go +++ b/internal/api/client.go @@ -45,6 +45,8 @@ type Client interface { MustBackpaginate(t *testing.T, roomID string, count int) // MustGetEvent will return the client's view of this event, or fail the test if the event cannot be found. MustGetEvent(t *testing.T, roomID, eventID string) Event + // MustBackupKeys will backup E2EE keys using the password provided, else fail the test. + MustBackupKeys(t *testing.T, password string) // Log something to stdout and the underlying client log file Logf(t *testing.T, format string, args ...interface{}) // The user for this client @@ -96,6 +98,12 @@ func (c *LoggedClient) MustBackpaginate(t *testing.T, roomID string, count int) c.Client.MustBackpaginate(t, roomID, count) } +func (c *LoggedClient) MustBackupKeys(t *testing.T, password string) { + t.Helper() + c.Logf(t, "%s MustBackupKeys password=%s", c.logPrefix(), password) + c.Client.MustBackupKeys(t, password) +} + func (c *LoggedClient) logPrefix() string { return fmt.Sprintf("[%s](%s)", c.UserID(), c.Type()) } diff --git a/internal/api/js.go b/internal/api/js.go index d29d90d..c839c55 100644 --- a/internal/api/js.go +++ b/internal/api/js.go @@ -298,6 +298,10 @@ func (c *JSClient) MustBackpaginate(t *testing.T, roomID string, count int) { )) } +func (c *JSClient) MustBackupKeys(t *testing.T, password string) { + +} + func (c *JSClient) WaitUntilEventInRoom(t *testing.T, roomID string, checker func(e Event) bool) Waiter { t.Helper() return &jsTimelineWaiter{ diff --git a/internal/api/rust.go b/internal/api/rust.go index f40ba09..c834d53 100644 --- a/internal/api/rust.go +++ b/internal/api/rust.go @@ -139,6 +139,9 @@ func (c *RustClient) IsRoomEncrypted(t *testing.T, roomID string) (bool, error) return r.IsEncrypted() } +func (c *RustClient) MustBackupKeys(t *testing.T, password string) { +} + func (c *RustClient) WaitUntilEventInRoom(t *testing.T, roomID string, checker func(Event) bool) Waiter { t.Helper() c.ensureListening(t, roomID)