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

Extend generic channel tests #223

Conversation

matthiasgeihs
Copy link
Contributor

Closes #219

Package channel: Adds generic tests for testing funder, adjudicator, and subscription implementation.

There are several problems with `func TestSetBackend`:
- It looks like a test function but it is contained within a non-test package.
- The test does not give any valuable information: We use it in the sim backend tests. However, the backend tests would fail anyways if the backend is not set correctly.

Signed-off-by: Matthias Geihs <[email protected]>
Function `FromEthState` did not set the App correctly on a decoded state.

Signed-off-by: Matthias Geihs <[email protected]>
@matthiasgeihs matthiasgeihs force-pushed the 219-extend-generic-channel-tests branch from 169827e to 1513db6 Compare September 23, 2021 12:18
@matthiasgeihs matthiasgeihs force-pushed the 219-extend-generic-channel-tests branch from 1513db6 to e682e05 Compare September 23, 2021 12:31
@matthiasgeihs matthiasgeihs force-pushed the 219-extend-generic-channel-tests branch from dcd7d9f to 6de987a Compare September 23, 2021 12:36
@ggwpez ggwpez mentioned this pull request Sep 24, 2021
channel/test/funder.go Show resolved Hide resolved
channel/test/funder.go Show resolved Hide resolved
channel/test/funder.go Show resolved Hide resolved
backend/ethereum/channel/funder_test.go Show resolved Hide resolved
backend/ethereum/channel/funder_test.go Show resolved Hide resolved
channel/test/subscription.go Show resolved Hide resolved
channel/test/subscription.go Show resolved Hide resolved
err := e.Timeout().Wait(ctx)
assert.NoError(t, err, "concluded: waiting")
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the most important to test would be the event skipping and fast-forwarding of RegisteredEvents.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the implementation is no trivial.

backend/ethereum/channel/adjudicator_test.go Show resolved Hide resolved
backend/ethereum/channel/subscription_test.go Show resolved Hide resolved
@matthiasgeihs matthiasgeihs marked this pull request as draft September 27, 2021 20:24
@matthiasgeihs
Copy link
Contributor Author

After some discussion, marking this as a draft. Planning to resume work on it later.

@matthiasgeihs
Copy link
Contributor Author

Closed until this becomes a higher priority again.

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.

Extend generic channel tests
2 participants