]> arthur.barton.de Git - bup.git/commitdiff
test_resolve_loop: ensure exception is actually thrown
authorRob Browning <rlb@defaultvalue.org>
Sat, 12 Jan 2019 22:22:14 +0000 (16:22 -0600)
committerRob Browning <rlb@defaultvalue.org>
Sun, 13 Jan 2019 18:09:13 +0000 (12:09 -0600)
Make sure to resolve the correct path, and ensure the call never
returns.  Previously when the path was wrong, and it *was* wrong, the
test would appear to succeed even though it wasn't actually testing
the intended ELOOP case.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/t/tvfs.py

index 668929114f0b5217bc5b71bfa7cf6bec9351c876..86a038b6fe1e94f11ce624a0c76eb15c70ccba4c 100644 (file)
@@ -627,10 +627,11 @@ def test_resolve_loop():
                 data_path))
             save_name = strftime('%Y-%m-%d-%H%M%S', localtime(save_utc))
             try:
-                resolve(repo, '/test/%s/loop' % save_utc)
+                wvpasseq('this call should never return',
+                         resolve(repo, '/test/%s/loop' % save_name))
             except vfs.IOError as res_ex:
                 wvpasseq(ELOOP, res_ex.errno)
-                wvpasseq(['', 'test', 'latest', 'loop'],
+                wvpasseq(['', 'test', save_name, 'loop'],
                          [name for name, item in res_ex.terminus])
 
 @wvtest