Login and Register tests for public key ethereum (#16)

* TestLoginPublicKeyNewSession

* use asserts

* setup, test, asserts

* TestLoginPublicKeyValidAuthTypeMissingSession

* invalid session id test

* create a helper newSession function

* TestLoginPublicKeyEthereumMissingUserId

* TestLoginPublicKeyEthereumAccountNotAvailable

* TestLoginPublicKeyEthereumInvalidUserId

* createEip4361TestMessage

* TestLoginPublicKeyEthereumMissingSignature

* TestLoginPublicKeyEthereum

* re-enable all publickey signin tests

* move common publickey test util to its own file

* register_public_key.go stub

* refactored common ethereum test helpers to its own folder

* refactor test helpers

* return error in test helpers

* fix regressions with ServerName

* TestRegistrationUnimplementedAlgo

* TestNewRegistration

* TestNewRegistrationSession

* verify new login session

* remove assert

* perform account creation

* TestRegisterEthereum

* Enable all tests

* move helper functions into test file

Co-authored-by: Tak Wai Wong <tak@hntlabs.com>
This commit is contained in:
Tak Wai Wong 2022-07-14 17:41:44 -04:00
parent d5050c1d61
commit 5ac83189d9
No known key found for this signature in database
GPG key ID: 222E4AF2AA1F467D

View file

@ -102,11 +102,7 @@ jobs:
strategy:
fail-fast: false
matrix:
<<<<<<< HEAD
go: ["1.18", "1.19"]
=======
go: ["1.18"]
>>>>>>> 698369f5 (merge latest changes from dendrite main (#15))
steps:
- uses: actions/checkout@v3
- name: Setup go