-
Notifications
You must be signed in to change notification settings - Fork 67
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
Please remove the test #26
Comments
Well, I put it there because I use it to test that building works with various combinations of packages (see the .travis.yml) Can't you simply arrange not to run it if you don't want it? |
Disabling it is not trivial in nixpkgs pinned to specific version. I'd use separate program/flag to run at travis. |
@ip1981 |
I'm looking for options. |
Alternatively you could try to get |
This works:
But. The test is broken by design :) |
Yah I've had to do that with other packages. Not fun. Database packages seem to often require a lot of harness for tests to run. |
I think it is unhelpful to say that the "test is broken by design". It is the way it is to make my job easier, and over time it may well be extended to do more functional tests. That said, I don't mind checking a flag or environment variable to stop the test trying to make a connection, but I would prefer to make the opt out explicit, leaving the default as it is. |
@paul-rouse The impedance mismatch is that the |
@3noch Yes, it does feel as if nixpkgs is really the right place - and of course stackage has a similar issue, but there is easy support for ignoring tests in that case. I'd still be happy to incorporate something if it makes life easier/cleaner for nixpkgs, though. |
@paul-rouse Anything that's not the "default" will be the same amount of work for nixpkgs because it will have to override. |
That said, some tests is better than no tests: if you had some way of disabling functional tests that might be the best. |
The current test would make a great example application, as an alternative to a test. Having tests is great, but this is also going to break if there is an actual mysql server running that doesn't support the test user without a password. Maybe the test should be written to start an alternate mysql server at an unused port and with a pre-set configuration that matches the expectations of the test. Thank you for maintaining this package (and mysql-simple), Paul! |
I am quite keen to keep this as a test, since it may well grow in the future to become more meaningful. I am also keen that a user who hasn't looked at the details, but just says Now, a "strong indication" doesn't have to be a test failure in the technical sense: I would be happy with a big, fat, unmissable message explaining what needs to be done to run the test in full. Unfortunately, if this message is produced by the test itself, Any ideas? |
I am stumped on how to get output while keeping the tests passing... Note: I generally have moved towards three test suites by default. Unit test. Basic integration tests. Extensive integration tests. Extensive integration tests get their own cabal file. The first two are in the main cabal file, with unit tests running by default and basic integration tests running as an opt-in by flag. You could force the basic integration test suite to run on PRs via Travis? |
https://hackage.haskell.org/package/gargoyle-postgresql-0.1/src/src/Gargoyle/PostgreSQL.hs - Obsidian recently used this to help Databrary run a database with minimal installation/hassle. I am not sure how much work it would be to port that to mysql, but if it were ported, that might provide some very convenient ways of writing tests that could be run anywhere with little ceremony. |
The test is useless and when run automatically it likely fails for reason not related to the package.
See for example: NixOS/nixpkgs#20478
The text was updated successfully, but these errors were encountered: