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: Skip integration tests without the presence of "-integration" flag #26

Closed
cristianoliveira opened this issue Oct 1, 2017 · 3 comments

Comments

@cristianoliveira
Copy link
Owner

We want to avoid run integration tests (tests inside tests folder) when not passed the flag -integration to go test command. go test .../. -v -integration.

Please take a look on how to implement this here:
https://siongui.github.io/2017/04/28/command-line-argument-in-golang-test/

This refers to #24

@mileswilson
Copy link
Contributor

Would you be open to implementing this as an environment variable?

Using flags means you have to implement the flag in all packages if you run tests using

go test .../.

else you get flag provided but not defined: -integration
messages in your tests for packages that do not define it.

I've pushed a commit that provides this functionality through an environment variable called INTEGRATION_TEST

Let me know if you'd like me to raise a PR.

@cristianoliveira
Copy link
Owner Author

Hey @mileswilson sure it is. The point here is just avoiding run integration tests when it isn't required.

@cristianoliveira
Copy link
Owner Author

Regarding your commit, I think it is exactly what we need. Feel free to open a PR :)

mileswilson pushed a commit to mileswilson/ergo that referenced this issue Oct 1, 2017
cristianoliveira pushed a commit that referenced this issue Oct 3, 2017
Work on tests (#31)

* Fix protocol prefix
* Add integration flag (referer to #26)
* Add windows support testing
* Fix test for url
* Split the tests
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

2 participants