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

test: separate out tests #103

Merged
merged 11 commits into from
Jan 31, 2023
Merged

test: separate out tests #103

merged 11 commits into from
Jan 31, 2023

Conversation

rahulghangas
Copy link
Contributor

@rahulghangas rahulghangas commented Jan 23, 2023

Move tests to standalone tests directory in each submodule

@rahulghangas rahulghangas marked this pull request as ready for review January 24, 2023 06:58
@rahulghangas rahulghangas requested a review from s1fr0 January 24, 2023 06:59
Copy link
Contributor

@s1fr0 s1fr0 left a comment

Choose a reason for hiding this comment

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

We should agree on a standard way to name tests. I think the most straightforward is to have the test source with same name as the logic source the tests refer to, rather than introducing new names (e.g. basic).

According to the above, it would also be great if there is no lib.rs under tests, in the sense that the tests that are currently present there (e.g. rln, semaphore) should be moved to/merged with tests with creates where such functionalities are implemented (e.g. semaphore/lib tests should be moved under tests/protocol.rs, etc.)

Also I see tests in rln/public were not moved and also some other ones.

@rahulghangas rahulghangas requested a review from s1fr0 January 30, 2023 11:36
Copy link
Contributor

@s1fr0 s1fr0 left a comment

Choose a reason for hiding this comment

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

Great PR! LGTM!

The only test I see should still be moved is https://github.com/vacp2p/zerokit/blob/test/separate-tests/semaphore/src/protocol.rs#L217, please do it before merging.

@rahulghangas
Copy link
Contributor Author

rahulghangas commented Jan 31, 2023

Whoops, missed that. Will refactor

@rahulghangas rahulghangas merged commit cbf8c54 into master Jan 31, 2023
@rahulghangas rahulghangas deleted the test/separate-tests branch January 31, 2023 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

feat: separate tests from logic
2 participants