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

Consider moving end2end tests to examples or tests #5

Closed
gyscos opened this issue Jun 8, 2020 · 2 comments
Closed

Consider moving end2end tests to examples or tests #5

gyscos opened this issue Jun 8, 2020 · 2 comments

Comments

@gyscos
Copy link
Contributor

gyscos commented Jun 8, 2020

I am trying to update cursive-tabs to depend on cursive_core rather than cursive (cursive_core is basically cursive without backends, so should be enough for libraries and have fewer breaking changes). Dependencies would still pull the full cursive crate.

Currently end2end test binaries are in src/bin/. This means that they use the same dependencies as the library itself; but (like other tests) they require the full cursive crate and not just cursive_core.

(There is a RFC for per-bin dependencies, but it's not looking good yet, and probably not really the right thing™ anyway.)

Moving it to tests or examples would make them use dev-dependencies.

Another (probably better) solution is the puppet-backend-tests branch, which replaces these with direct individual tests.

@jwuensche
Copy link
Member

The tests were always a bit shaky on their concept, we wanted to be able to view the test cases we created while simultaneously hiding them from someone who just might want to have a look at common use cases in the /examples to use as a starting point for their application, that was the original reason why we chose /src/bin with tmux as terminal emulation in the actual tests.

I agree with you that moving the puppet-backend-tests branch on master would probably be the best course of action. This way we can simplify the testing process quite a bit (not requiring npm e.g. 😅). The only real 'loss' we would have in this case is the viewability of tests, but the gains of only having cursive_core as required dependency and simplification of testing outweigh this factor imo. (@fin-ger)

If everyone is onboard for the proposed changes I would like to add them with the release process for the next minor 0.5.

@jwuensche
Copy link
Member

Finally managed to put everything together, the puppet-backend-tests branch could be brought quickly up to date with the current version and it worked rather well 😁.
The old tests are now all translated to puppet tests and located directly in tests, this also makes testing a bit easier as no prerequirements except rust is required.

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

No branches or pull requests

2 participants