diff --git a/go.mod b/go.mod index 6fb8496d..9b125df8 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/Masterminds/semver/v3 v3.1.1 github.com/ProtonMail/gluon v0.14.2-0.20221207071431-0faa318d3c9f github.com/ProtonMail/go-autostart v0.0.0-20210130080809-00ed301c8e9a - github.com/ProtonMail/go-proton-api v0.2.1 + github.com/ProtonMail/go-proton-api v0.2.2-0.20221212093343-0afe67dc1c50 github.com/ProtonMail/go-rfc5322 v0.11.0 github.com/ProtonMail/gopenpgp/v2 v2.4.10 github.com/PuerkitoBio/goquery v1.8.0 diff --git a/go.sum b/go.sum index e3d773c1..58848305 100644 --- a/go.sum +++ b/go.sum @@ -47,6 +47,8 @@ github.com/ProtonMail/go-mime v0.0.0-20220429130430-2192574d760f h1:4IWzKjHzZxdr github.com/ProtonMail/go-mime v0.0.0-20220429130430-2192574d760f/go.mod h1:qRZgbeASl2a9OwmsV85aWwRqic0NHPh+9ewGAzb4cgM= github.com/ProtonMail/go-proton-api v0.2.1 h1:M15/zzfx6EPiskv2+gogUkmvx7Y1SmRRtLT6GiBh5T0= github.com/ProtonMail/go-proton-api v0.2.1/go.mod h1:jqvJ2HqLHqiPJoEb+BTIB1IF7wvr6p+8ZfA6PO2NRNk= +github.com/ProtonMail/go-proton-api v0.2.2-0.20221212093343-0afe67dc1c50 h1:DXcvmx1sx20YsFmP40kCRYD+jzBy6OLjvFQFCbht4ZI= +github.com/ProtonMail/go-proton-api v0.2.2-0.20221212093343-0afe67dc1c50/go.mod h1:jqvJ2HqLHqiPJoEb+BTIB1IF7wvr6p+8ZfA6PO2NRNk= github.com/ProtonMail/go-rfc5322 v0.11.0 h1:o5Obrm4DpmQEffvgsVqG6S4BKwC1Wat+hYwjIp2YcCY= github.com/ProtonMail/go-rfc5322 v0.11.0/go.mod h1:6oOKr0jXvpoE6pwTx/HukigQpX2J9WUf6h0auplrFTw= github.com/ProtonMail/go-srp v0.0.5 h1:xhUioxZgDbCnpo9JehyFhwwsn9JLWkUGfB0oiKXgiGg= diff --git a/tests/api_test.go b/tests/api_test.go index 530cea4e..da2d26fd 100644 --- a/tests/api_test.go +++ b/tests/api_test.go @@ -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 diff --git a/tests/user_test.go b/tests/user_test.go index eb7be069..786427ad 100644 --- a/tests/user_test.go +++ b/tests/user_test.go @@ -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 {