Any way to know token for default user?
eblondel opened this issue · comments
Hello, first of all thanks for this repository!
I contact you as i'm trying to use dataverse-docker as QA integration tests for a Sword API client, configured in Travis CI. The docker image works well, but to trigger integration tests I need to know and set a valid token. Is there any way to get token for default user/password, or maybe a default token for testing?
Thanks
Emmanuel
Hi @eblondel, you can get it directly from dataverse database in postgres, token table.
Thanks @4tikhonov would there a way to get this token from command line to set it dynamically as environment variable?
Yes, it's possible directly to get it from any Docker container (Dataverse or postgres). For example:
PGPASSWORD=changeme psql -U dataverse dataverse -h postgresql -c "select tokenstring from apitoken where id=1";
Do you know about Dataverse Selenium tests from this repository, right? https://github.com/GlobalDataverseCommunityConsortium/dataverse-test-suite
No, didn't know this repository
Yes, it's possible directly to get it from any Docker container (Dataverse or postgres). For example:
PGPASSWORD=changeme psql -U dataverse dataverse -h postgresql -c "select tokenstring from apitoken where id=1";
Thanks a lot @4tikhonov I could use the instance locally with the token provided by default. However when running it on Travis CI build, I get a "Forbidden" error when trying to retrieve the Dataverse SWORD service document, do you have any idea how I could solve that? See https://travis-ci.org/github/eblondel/atom4R/jobs/725993758#L5869 Could it come from restriction from Travis to interrogate localhost:8085 ?