]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Fixed tests so that they pass also on buildbots.
authorAlberto Berti <alberto@metapensiero.it>
Sun, 22 Feb 2009 23:43:11 +0000 (16:43 -0700)
committerAlberto Berti <alberto@metapensiero.it>
Sun, 22 Feb 2009 23:43:11 +0000 (16:43 -0700)
src/allmydata/test/test_cli.py

index 21f3818c73daf01987ce83d9149034945298410f..ac42003177f86b8060ab3e690bd6d7e7d8e37dae 100644 (file)
@@ -953,19 +953,22 @@ class Backup(GridTestMixin, CLITestMixin, StallMixin, unittest.TestCase):
 
         # test simple exclude
         backup_options = cli.BackupOptions()
-        backup_options.parseOptions(['--exclude', '*lyx', 'from', 'to'])
+        backup_options.parseOptions(['--exclude', '*lyx', '--node-url',
+                                     'http://ignore.it:2357', 'from', 'to'])
         filtered = list(backup_options.filter_listdir(root_listdir))
         _check_filtering(filtered, root_listdir, ('lib.a', '_darcs', 'subdir'),
                          ('nice_doc.lyx',))
         # multiple exclude
         backup_options = cli.BackupOptions()
-        backup_options.parseOptions(['--exclude', '*lyx', '--exclude', 'lib.?', 'from', 'to'])
+        backup_options.parseOptions(['--exclude', '*lyx', '--exclude', 'lib.?', '--node-url',
+                                     'http://ignore.it:2357', 'from', 'to'])
         filtered = list(backup_options.filter_listdir(root_listdir))
         _check_filtering(filtered, root_listdir, ('_darcs', 'subdir'),
                          ('nice_doc.lyx', 'lib.a'))
         # vcs metadata exclusion
         backup_options = cli.BackupOptions()
-        backup_options.parseOptions(['--exclude-vcs', 'from', 'to'])
+        backup_options.parseOptions(['--exclude-vcs', '--node-url',
+                                     'http://ignore.it:2357', 'from', 'to'])
         filtered = list(backup_options.filter_listdir(subdir_listdir))
         _check_filtering(filtered, subdir_listdir, ('another_doc.lyx', 'run_snake_run.py',),
                          ('CVS', '.svn', '_darcs'))
@@ -977,14 +980,16 @@ class Backup(GridTestMixin, CLITestMixin, StallMixin, unittest.TestCase):
         excl_file.write(exclusion_string)
         excl_file.close()
         backup_options = cli.BackupOptions()
-        backup_options.parseOptions(['--exclude-from', excl_filepath, 'from', 'to'])
+        backup_options.parseOptions(['--exclude-from', excl_filepath, '--node-url',
+                                     'http://ignore.it:2357', 'from', 'to'])
         filtered = list(backup_options.filter_listdir(subdir_listdir))
         _check_filtering(filtered, subdir_listdir, ('another_doc.lyx', 'CVS'),
                          ('.svn', '_darcs', 'run_snake_run.py'))
         # text BackupConfigurationError
         self.failUnlessRaises(cli.BackupConfigurationError,
                               backup_options.parseOptions,
-                              ['--exclude-from', excl_filepath + '.no', 'from', 'to'])
+                              ['--exclude-from', excl_filepath + '.no', '--node-url',
+                               'http://ignore.it:2357', 'from', 'to'])
 
 
 class Check(GridTestMixin, CLITestMixin, unittest.TestCase):