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

tests should not need internet conection #234

Closed
1ucian0 opened this issue Jan 8, 2018 · 4 comments
Closed

tests should not need internet conection #234

1ucian0 opened this issue Jan 8, 2018 · 4 comments
Assignees
Labels
type: qa Issues and PRs that relate to testing and code quality

Comments

@1ucian0
Copy link
Member

1ucian0 commented Jan 8, 2018

The testsuite should not depend on the status of the internet connection. Coding on trains and planes is fun and should be supported :)

Expected Behavior

It is a common practice to mock the external requests using a library like mock doc. The calls to remote APIs are replaced by reads to local files.

Possible Solution

I did something like that in the past and it could be useful initially (not sure if my way is totally correct neither).

Steps to Reproduce

  1. Put your computer offline
  2. Run the tests
  3. Enjoy seeing them failing.
@1ucian0 1ucian0 added bug Something isn't working good first issue Good for newcomers labels Jan 8, 2018
@atilag
Copy link
Member

atilag commented Jan 8, 2018

We have something in place because of Travis. IIRC, the plan was enabling non-internet connection testing on
Travis, and if this worked as expected, roll out the feature so everyone can enable or disable it, am I right @diego-plan9 ?

@diego-plan9
Copy link
Member

We have something in place because of Travis. IIRC, the plan was enabling non-internet connection testing on Travis, and if this worked as expected, roll out the feature so everyone can enable or disable it, am I right @diego-plan9 ?

Yes, there is a WIP that mocks the calls to the API that is still not up mostly due to deciding the logic on applying the mocking. I'll retake it, specially since we also had a number of travis failures due to timeouts and network issues recently.

@diego-plan9 diego-plan9 self-assigned this Jan 11, 2018
@1ucian0 1ucian0 added the type: qa Issues and PRs that relate to testing and code quality label Feb 16, 2018
@1ucian0
Copy link
Member Author

1ucian0 commented Jun 29, 2018

After some face-to-face discussion, we decided to solve this issue with a local REST server. Possible candidates:

@delapuente
Copy link
Contributor

To summarize the motivation, since these are integration tests, we want to test the maximum surface at the same time we enable the possibility of testing without network access. So the idea is to record the answers from the real servers and use them during offline.

@delapuente delapuente added this to the 0.7 milestone Jul 31, 2018
@delapuente delapuente added status: confirmed and removed good first issue Good for newcomers labels Jul 31, 2018
@delapuente delapuente removed this from the 0.7 milestone Jul 31, 2018
@ajavadia ajavadia added this to the 0.6 milestone Jul 31, 2018
@ajavadia ajavadia removed the bug Something isn't working label Jul 31, 2018
@ajavadia ajavadia removed this from the 0.6 milestone Jul 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: qa Issues and PRs that relate to testing and code quality
Projects
None yet
Development

No branches or pull requests

5 participants