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

orderwatch: Add missing test coverage #416

Merged
merged 26 commits into from Sep 17, 2019

Conversation

@fabioberger
Copy link
Contributor

fabioberger commented Sep 14, 2019

Fixes: #405

WARNING: Don't merge. Currently opened against #415. Will open against development once #415 lands.

This PR adds test coverage of the OrderWatcher's functionality of properly processing block events and updating the orders in the DB accordingly. In order to do this, we needed to trigger each of the events we listen for and then check to make sure it was picked up and processed properly.

CHANGELOG.md Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
zeroex/orderwatch/order_watcher_test.go Outdated Show resolved Hide resolved
zeroex/orderwatch/order_watcher_test.go Outdated Show resolved Hide resolved
zeroex/orderwatch/order_watcher_test.go Outdated Show resolved Hide resolved
zeroex/orderwatch/order_watcher_test.go Outdated Show resolved Hide resolved
zeroex/orderwatch/order_watcher_test.go Outdated Show resolved Hide resolved
zeroex/orderwatch/order_watcher_test.go Show resolved Hide resolved
zeroex/orderwatch/order_watcher_test.go Outdated Show resolved Hide resolved
integration-tests/integration_test.go Outdated Show resolved Hide resolved
@fabioberger fabioberger force-pushed the orderWatcherTests branch from 1b00c84 to f69eb51 Sep 17, 2019
@fabioberger fabioberger changed the base branch from refactor/integrationTests to development Sep 17, 2019
zeroex/orderwatch/order_watcher_test.go Outdated Show resolved Hide resolved
zeroex/orderwatch/order_watcher_test.go Outdated Show resolved Hide resolved
zeroex/orderwatch/order_watcher_test.go Show resolved Hide resolved
scenario/scenario.go Outdated Show resolved Hide resolved
@albrow
albrow approved these changes Sep 17, 2019
Copy link
Member

albrow left a comment

Left two nitpick comments but other than that looks good to me! Feel free to go ahead and merge.

t.Fatal("timed out waiting for order events")
}
return []*zeroex.OrderEvent{}
}

This comment has been minimized.

Copy link
@albrow

albrow Sep 17, 2019

Member

nit: There's no new line at the end of this file. Do you have your editor configured to automatically add them?

This comment has been minimized.

Copy link
@fabioberger

fabioberger Sep 17, 2019

Author Contributor

I have "files.insertFinalNewline": true,

scenario/scenario.go Show resolved Hide resolved
@fabioberger fabioberger merged commit 7422384 into development Sep 17, 2019
1 check passed
1 check passed
ci/circleci: build Your tests passed on CircleCI!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.