mozillascience / PaperBadger

Issuing badges to credit authors for their work on academic papers
https://badges.mozillascience.org/
Mozilla Public License 2.0
95 stars 45 forks source link

using env.docker does not read the right values for env variables #199

Closed drammock closed 8 years ago

drammock commented 8 years ago

many tests fail with Get error from return Badges NotAuthorizedError: Invalid token signature when the environment file is named env.docker rather than .env. cp env.docker .env is a temporary workaround. @josmas thinks this might be related to how habitat is being used.

josmas commented 8 years ago

I do indeed! The thing is that the docker setup used to be used only for quickly running things, not for development, and it used to copy the whole sources folder into the container. It does not do that anymore, so the env.docker file is getting lost somehow. We probably need to get rid of it and change the setup instructions in the readme, but have to look at it with a bit more time!

josmas commented 8 years ago

@drammock just checked this one and it works for me if I run the tests inside the container. It won't work if the tests are run outside the container. You can connect to the container with docker exec -it CONTAINER_NAME_OR_HASH /bin/bash and then cd src && npm test. At times they do timeout, but the variables seem to be read correctly (they will not if you try to run the tests from the host).

josmas commented 8 years ago

I think that in any case, we can simplify this by getting rid of env.docker and just asking everyone to use .env. That way it should work both outside and inside the container.

abbycabs commented 8 years ago

+1 simplifying to just .env if we can

drammock commented 8 years ago

@josmas confirmed, tests pass within the container.