Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt tests #1

Open
joshua-morris opened this issue Jul 12, 2019 · 2 comments
Open

Adapt tests #1

joshua-morris opened this issue Jul 12, 2019 · 2 comments

Comments

@joshua-morris
Copy link
Collaborator

Adapt the tests to use the sandbox API key.

@madjestic
Copy link
Collaborator

madjestic commented May 30, 2020

Can't a compiler pragma be used to set baseURL = sandboxURL when compiled with a debug flag for example?

For example it could be something like:
change in proj.cabal:

...
--cpp-options:         -DSANDBOX
...

and in the Stocks.hs we do:

#ifdef SANDBOX
baseURL = sandboxURL
#endif

There's probably more than 1 way to fix #1. What do you have in mind how to approach it?

Cheers,
Vlad

@ksallberg
Copy link
Owner

I tried to do what you describe here, but I didn't succeed and have no more time this weekend. Basically when i run "stack test" with default=True on the flag, the system still does not call the sandbox URL.

688eed3

If you want you could help me out if you see what is wrong. Also I think this change would conflict with the relaxation of dependencies that you proposed.

Another approach could be to require the user to specify the URL they want to use in each API call. But that would put more burden on the user of this code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants