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

Setup e2e testsuite #25

Merged
merged 9 commits into from
Sep 5, 2023
Merged

Setup e2e testsuite #25

merged 9 commits into from
Sep 5, 2023

Conversation

mara-schulke
Copy link
Contributor

Introduces

  • Infrastructure for tests (VirtualFileSystem, macros, utils)
  • A first fixture test for buffrs add

@mara-schulke mara-schulke self-assigned this Sep 2, 2023
@uschi2000
Copy link
Contributor

this looks very good, thank you! just minor comments on naming.

Copy link
Contributor

Choose a reason for hiding this comment

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

is this meant to be here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes it is! It's the asserted stdout log of the cli in this test. Is there any reason to delete it?

I think adjusting the test will be much easier when there is already the setup for present for asserting stdout logs.

Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure the logs are stable enough for equality assertion? Eg, timestamps will change, and even the order of entries might change (at least if there's any concurrent code).

I would consider stdout assertions relative low value; so if it's easy then we can include them, otherwise I don't think you loose much if you remove them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Asserting that the logs are empty does provide value; It ensures we don't add accidental log statements in the add command / helpful error messages are given in error cases

Also for concurrent operations eg cargo does not assert the logs / uses a different setup:

https://github.com/rust-lang/cargo/blob/master/tests/testsuite/concurrent.rs

@mara-schulke mara-schulke linked an issue Sep 4, 2023 that may be closed by this pull request
@mara-schulke mara-schulke merged commit deb049b into main Sep 5, 2023
@mara-schulke mara-schulke deleted the mara/e2e branch September 5, 2023 08:27
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.

Setup E2E Tests
2 participants