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

Replace URLs pointing at production with example.com URLs in test resources #78

Closed
ljleppan opened this issue Sep 4, 2015 · 2 comments

Comments

@ljleppan
Copy link
Member

ljleppan commented Sep 4, 2015

No description provided.

@ljleppan ljleppan changed the title Replace URL pointing at production with example.com URLs in test resources Replace URLs pointing at production with example.com URLs in test resources Sep 4, 2015
@wakr
Copy link
Contributor

wakr commented Sep 5, 2015

Can take this one but more description would be nice :)

@ljleppan
Copy link
Member Author

ljleppan commented Sep 5, 2015

We currently have multiple JSON files we use as test resources (see f.ex. here). Many of these files contain URLs that point to current production systems (example). For the purposes of this task, also consider any staging environments "production", since we have no reason to interact with them during unit tests.

To prevent accidents (sending diffs to the spyware server during tests, submitting exercises to TMC server by accident), these should be replaced with safe alternatives. The safe alternatives can take the form of either localhost URLs or -- perhaps preferably -- URLs pointing at http://www.example.com. The preference for example.com is due to the fact that localhost could theoretically point to some system (f.ex. WireMock) while any URL pointing at example.com can be instantly recognized as a placeholder value.

In practice the task would be to go over these JSON files and change all URLs pointing to tmc.mooc.fi or other such production environments with something that can cause no damage and then fixing the tests that break as a result.

@wakr wakr mentioned this issue Sep 9, 2015
@jamo jamo closed this as completed Jun 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants