aboutsummaryrefslogtreecommitdiff
path: root/test/T240-dump-restore.sh
AgeCommit message (Collapse)Author
2023-07-21test: support testing notmuch as installedDavid Bremner
We put some effort into testing the built copy rather than some installed copy. On the other hand for people like packagers, testing the installed copy is also of interest. When NOTMUCH_TEST_INSTALLED is set to a nonempty value, tests do not require a built notmuch tree or running configure. Some of the tests marked as broken when running against installed notmuch are probably fixable.
2023-07-21test: treat undefined feature variables as 0David Bremner
When running the test suite without building first, it is desirable to have the tests consider these variables being undefined as equivalent to the feature not being present, and in particular for the tests not to generate errors.
2021-09-04CLI/{count, dump, reindex, reply, show}: enable sexp queriesDavid Bremner
The change in each case is to call notmuch_query_create_with_syntax, relying on the already inherited shared options. As a bonus we get improved error handling from the new query creation API. The remaining subcommand is 'tag', which is a bit trickier.
2021-03-12test: clean up some extra whitespace.David Bremner
The extra space is mainly just untidy.
2021-02-06cli/dump: convert to new config frameworkDavid Bremner
This conversion is trivial because the only configuration information accessed by dump is that stored in the database (in order to dump it). We do need to be careful to keep the write lock on the database to ensure dump consistency.
2017-10-20test: use $(dirname "$0") for sourcing test-lib.shJani Nikula
Don't assume the tests are always run from within the source tree.
2017-04-06test: standardize argument order to test_expect_equal_fileDavid Bremner
It is annoying to debug failing tests when the interpretation of the diffs is reversed for some tests.
2017-04-01Merge branch 'release'David Bremner
Final 0.24.1 release
2017-04-01cli/dump: bump dump format version to 3David Bremner
No changes to the format of the body, but the header format was fixed, and version 2 headers probably shouldn't be relied on.
2017-04-01cli/dump: fix bug in dump headerDavid Bremner
Fix copy paste error.
2017-04-01test: add known broken test for dump headerDavid Bremner
Apparently nobody uses the list of "what was included in the dump"
2017-03-31test: add known broken test for dump headerDavid Bremner
Apparently nobody uses the list of "what was included in the dump"
2017-03-09test: require test_begin_subtest before test_expect_successJani Nikula
Unify the subtests by requiring test_begin_subtest before test_expect_success. (Similar change for test_expect_code will follow.) This increases clarity in the test scripts by having a separate line for the start of the subtest with the heading, and makes it possible to simplify the test infrastructure by making all subtests similar.
2016-06-29test: don't use dump and restore in a pipelineDavid Bremner
This has been wrong since bbbdf0478ea, but the race condition was not previously been (often?) triggered in the tests. With the DB_RETRY_LOCK patches, it manifests itself as a deadlock.
2016-05-25CLI: add optional config data to dump output.David Bremner
Note that it changes the default dump output format, but doesn't break existing notmuch-restore. It might break user scripts though.
2015-08-07test: make script exit (1) if it "fails" to source (.) a fileTomi Ollila
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.
2014-04-12restore: transparently support gzipped inputDavid Bremner
We rely completely on zlib to do the right thing in detecting gzipped input. Since our dump format is chosen to be 7 bit ascii, this should be fine.
2014-04-12test: restore with missing final newlineDavid Bremner
Recent proposed patches for gzipped input had a bug with handling missing newlines that was not caught by the current test suite
2014-04-12dump: support gzipped and atomic outputDavid Bremner
The main goal is to support gzipped output for future internal calls (e.g. from notmuch-new) to notmuch_database_dump. The additional dependency is not very heavy since xapian already pulls in zlib. We want the dump to be "atomic", in the sense that after running the dump file is either present and complete, or not present. This avoids certain classes of mishaps involving overwriting a good backup with a bad or partial one.
2014-01-13test: renamed test scripts to format T\d\d\d-name.shTomi Ollila
All test scripts to be executed are now named as T\d\d\d-name.sh, numers in increments of 10. This eases adding new tests and developers to see which are test scripts that are executed by test suite and in which order.