Unverified Commit d2f901ef authored by Sietse Ringers's avatar Sietse Ringers Committed by GitHub
Browse files

Merge pull request #2 from koen92/readme-unit-test

Add README.md for running unit tests
parents dadcf970 aaa3505d
......@@ -8,3 +8,31 @@ Irmago is an IRMA client in Go: it can receive IRMA attributes, store them, disc
* It is the client (like the [IRMA Android app](https://github.com/credentials/irma_android_cardemu)) in the [IRMA protocol](https://credentials.github.io/protocols/irma-protocol/)
* It parses [credential and issuer definitions and public keys](https://github.com/credentials/irma_configuration)
* It also implements the [keyshare protocol](https://github.com/credentials/irma_keyshare_server) and handles registering to keyshare servers.
## Running the unit tests
For running the unit tests, you need to run [irma_keyshare_server](https://github.com/credentials/irma_keyshare_server) and [irma_api_server](https://github.com/credentials/irma_api_server) locally.
### IRMA Keyshare Server
- Copy the `irma_configuration` folder from `testdata/` to the configuration of the Keyshare server.
- Note that a `gradle appRun` won't automatically use the new `irma_configuration` folder if it was already built with an old one. For this, use `gradle clean`.
- Add the keyshare user used in the unit tests to the keyshare database by a command like this:
mysql -uirma -pirma irma_keyshare < keyshareuser.sql
- Make sure `check_user_enabled` is set to false in the Keyshare server configuration. Other options are already setup correctly in the example configuration.
### IRMA Api Server
- Copy the `irma_configuration` folder from `testdata/` to the configuration of the IRMA api server.
- Note that a `gradle appRun` won't automatically use the new `irma_configuration` folder if it was already built with an old one. For this, use `gradle clean`.
## Running the tests
The tests can be run by using:
go test
<!-- vim: set ts=4 sw=4: -->
......@@ -167,7 +167,7 @@ func sessionHelper(t *testing.T, jwtcontents interface{}, url string, client *Cl
client = parseStorage(t)
}
url = "http://localhost:8088/irma_api_server/api/v2/" + url
url = "http://localhost:8081/irma_api_server/api/v2/" + url
//url = "https://demo.irmacard.org/tomcat/irma_api_server/api/v2/" + url
headerbytes, err := json.Marshal(&map[string]string{"alg": "none", "typ": "JWT"})
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment