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

Create integration tests #201

Merged
merged 5 commits into from
May 6, 2022
Merged

Conversation

peczenyj
Copy link
Contributor

@peczenyj peczenyj commented May 2, 2022

Hello

I note that most of the tests are integration tests instead unit tests. They need a nebula db running and listening to be executed.

This indeed is a very precise way to stablish that one driver is running fine: if we can interact with a real database with success it means the driver is correct. However it demands a specific environment and it may trigger false negatives (in case of timeouts, etc). A better approach is to having a way to easily run all unit tests - to be used as a quick check, before run a full integration test suite.

By using build tags, we can run unit and integration tests easily.

I add a make unit for this

Regards

@wey-gu
Copy link
Contributor

wey-gu commented May 5, 2022

Thanks a lot, @peczenyj for your elegant work.

Now, the ability to run pure UT w/ Functional/Integration ones relying on the heavier docker-compose is so very important and awesome.

@Aiee Aiee merged commit fde50e7 into vesoft-inc:master May 6, 2022
peczenyj added a commit to peczenyj/nebula-go that referenced this pull request May 8, 2022
* add build tag for integration tests

* add unit rule to run unit tests

* add unit as phony

* improve formatting of each _test file, enable coverate on functional tests

* add badge for test results
peczenyj added a commit to peczenyj/nebula-go that referenced this pull request May 8, 2022
* add build tag for integration tests

* add unit rule to run unit tests

* add unit as phony

* improve formatting of each _test file, enable coverate on functional tests

* add badge for test results
Aiee added a commit that referenced this pull request May 10, 2022
… as a nebula driver (#200)

* remove remote services, the code is not necessary to use this project as a nebula driver

* Create integration tests (#201)

* add build tag for integration tests

* add unit rule to run unit tests

* add unit as phony

* improve formatting of each _test file, enable coverate on functional tests

* add badge for test results

Co-authored-by: Yichen Wang <[email protected]>
peczenyj added a commit to peczenyj/nebula-go that referenced this pull request May 10, 2022
… as a nebula driver (vesoft-inc#200)

* remove remote services, the code is not necessary to use this project as a nebula driver

* Create integration tests (vesoft-inc#201)

* add build tag for integration tests

* add unit rule to run unit tests

* add unit as phony

* improve formatting of each _test file, enable coverate on functional tests

* add badge for test results

Co-authored-by: Yichen Wang <[email protected]>
Aiee added a commit that referenced this pull request Jul 1, 2022
* update test to check ipv6 version of localhost

* use net.JoinHostPort to handle the ipv6 case properly

* remove remote services, the code is not necessary to use this project as a nebula driver (#200)

* remove remote services, the code is not necessary to use this project as a nebula driver

* Create integration tests (#201)

* add build tag for integration tests

* add unit rule to run unit tests

* add unit as phony

* improve formatting of each _test file, enable coverate on functional tests

* add badge for test results

Co-authored-by: Yichen Wang <[email protected]>

Co-authored-by: Yichen Wang <[email protected]>
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

Successfully merging this pull request may close these issues.

3 participants