Commit graph

7 commits

Author SHA1 Message Date
Tomi Ollila
02a2eeb427 test: make script exit (1) if it "fails" to source (.) a file
The files (test) scripts source (with builtin command `.`) provides
information which the scripts depend, and without the `source` to
succeed allowing script to continue may lead to dangerous situations
(e.g. rm -rf "${undefined_variable}"/*).

At the end of all source (.) lines construct ' || exit 1' was added;
In our case the script script will exit if it cannot find (or read) the
file to be sourced. Additionally script would also exits if the last
command of the sourced file exited nonzero.
2015-08-07 21:56:39 +02:00
Austin Clements
4e2c351c58 test: Test upgrade to ghost messages feature 2014-10-25 19:42:47 +02:00
Austin Clements
344e4c65a4 new: Don't report version after upgrade
The version number has always been pretty meaningless to the user and
it's about to become even more meaningless with the introduction of
"features".  Hopefully, the database will remain on version 3 for some
time to come; however, the introduction of new features over time in
version 3 will necessitate upgrades within version 3.  It would be
confusing if we always tell the user they've been "upgraded to version
3".  If the user wants to know what's new, they should read the news.
2014-08-30 10:40:41 -07:00
David Bremner
b8327ab483 test: verify tag backup generated by database upgrade
'pre upgrade dump' is not much of a test, but at least this way we get
somewhat sensible behaviour if it fails.
2014-04-12 07:59:44 -03:00
David Bremner
a7eaa4d84a notmuch-new: backup tags before database upgrade
All we do here is calculate the backup filename, and call the existing
dump routine.

Also take the opportunity to add a message about being safe to
interrupt.
2014-04-12 07:59:44 -03:00
David Bremner
8413582b6e test: add machinery to download and verify databases
Note that it is intentional that the checksum file is not
downloaded. The intent is to check those into git.
2014-03-11 19:51:22 -03:00
Jani Nikula
50345d1263 test: add database upgrade test from format version 1 to 2
Test the upgrade from probabilistic to boolean folder: terms, and
addition of path: terms.

The test depends on the pre-built test corpus and database tarball and
checksum file being in place. If it's not, the test is skipped. The
mechanism to fetch the test database will be added later.

At the time of writing, a working test database and checksum file is
available at

   http://notmuchmail.org/releases/test-databases/

It has been noted that some non-GNU environments make lack
sha256sum. We leave this portability issue for a followup patch.
2014-03-11 19:51:22 -03:00