forked from Silverfish/proton-bridge
Other(test): Prefer native API revoke rather than fake server method
This commit is contained in:
@ -29,8 +29,6 @@ type API interface {
|
||||
AddCallWatcher(func(server.Call), ...string)
|
||||
|
||||
CreateUser(username, address string, password []byte) (string, string, error)
|
||||
RevokeUser(userID string) error
|
||||
|
||||
CreateAddress(userID, address string, password []byte) (string, error)
|
||||
RemoveAddress(userID, addrID string) error
|
||||
RemoveAddressKey(userID, addrID, keyID string) error
|
||||
|
||||
@ -310,7 +310,9 @@ func (s *scenario) userIsDeleted(username string) error {
|
||||
}
|
||||
|
||||
func (s *scenario) theAuthOfUserIsRevoked(username string) error {
|
||||
return s.t.api.RevokeUser(s.t.getUserID(username))
|
||||
return s.t.withClient(context.Background(), username, func(ctx context.Context, client *proton.Client) error {
|
||||
return client.AuthRevokeAll(ctx)
|
||||
})
|
||||
}
|
||||
|
||||
func (s *scenario) userIsListedAndConnected(username string) error {
|
||||
|
||||
Reference in New Issue
Block a user