Skip to content

Commit

Permalink
Add stub MustBackupKeys; update rust-sdk to 3481cde1dc02b4a80b9054bca…
Browse files Browse the repository at this point in the history
…e5076e94d28f00b just before 6a27fc2e04a54911a1867e1d3a442fd34c82e8c8
  • Loading branch information
kegsay committed Nov 22, 2023
1 parent 94afc29 commit 980b2e8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/api/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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())
}
Expand Down
4 changes: 4 additions & 0 deletions internal/api/js.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
3 changes: 3 additions & 0 deletions internal/api/rust.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 980b2e8

Please sign in to comment.