summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/utils.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/utils.py b/tests/utils.py
index 8b974ed..f21bd38 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -22,7 +22,7 @@ from nose.tools import *
from os import path, remove, rmdir
from combox.config import config_cb, get_nodedirs
-from combox.file import relative_path
+from combox.file import relative_path, purge_dir
def get_input_func():
"""Returns the input function
@@ -57,6 +57,17 @@ def get_config():
return config_cb(config_dir, pass_func, input_func, write=False)
+def rm_nodedirs(config):
+ """Removes node directories"""
+ nodes = get_nodedirs(config)
+ for node in nodes:
+ try:
+ purge_dir(node)
+ rmdir(node)
+ except OSError, e:
+ print "Problem deleting", node, e
+
+
def shardedp(f):
"""Checks if file's shards exists in the node directories"""