diff options
author | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2003-02-11 07:37:12 +0000 |
---|---|---|
committer | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2003-02-11 07:37:12 +0000 |
commit | 9613406fbab1949f66fe7858590cab990c7b4b25 (patch) | |
tree | 573a6106da5bb7ead2c4f17c45be664063d67e01 /rdiff-backup/testing/journaltest.py | |
parent | e18d568c6fdfa1a73fea01362d5bdf31aaa0d5b5 (diff) | |
download | rdiff-backup-9613406fbab1949f66fe7858590cab990c7b4b25.tar.gz |
First pass at integrating regress code
At this point most of the tests work, but there are still problems
with the finaltest error tests on /proc, and with some selection
options. The regress code is totally unchecked, and regresstest.py is
unwritten.
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@277 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/testing/journaltest.py')
-rw-r--r-- | rdiff-backup/testing/journaltest.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/rdiff-backup/testing/journaltest.py b/rdiff-backup/testing/journaltest.py index 76e638a..9db1ff2 100644 --- a/rdiff-backup/testing/journaltest.py +++ b/rdiff-backup/testing/journaltest.py @@ -6,20 +6,26 @@ class JournalTest(unittest.TestCase): def testBasic(self): """Test opening a journal, then reading, writing, and deleting""" MakeOutputDir() - Globals.rbdir = rpath.RPath(Globals.local_connection, - "testfiles/output") + Globals.dest_root = rpath.RPath(Globals.local_connection, + "testfiles/output") + Globals.rbdir = Globals.dest_root.append("rdiff-backup-data") + + Globals.rbdir.mkdir() journal.open_journal() assert len(journal.get_entries_from_journal()) == 0 # It's important that none of these files really exist - e1 = journal.write_entry("Hello48", "reg", "inc_file3917", "t39p") - e2 = journal.write_entry("2nd_euoeuo", None, "inc_file4832", "l389") + e1 = journal.write_entry(("Hello48",), ("temp_index", "foo"), + 2, "reg") + e2 = journal.write_entry(("2nd", "Entry", "now"), + ("temp_index",), 1, None) assert e1.entry_rp and e2.entry_rp l = journal.get_entries_from_journal() assert len(l) == 2 - first_filename = l[0].test_filename - assert first_filename == "Hello48" or first_filename == "2nd_euoeuo" + first_index = l[0].index + assert (first_index == ("Hello48",) or + first_index == ("2nd", "Entry", "now")) # Now test recovering journal, and make sure everything deleted journal.recover_journal() |