diff options
author | Siddharth Ravikumar <sravik@bgsu.edu> | 2015-02-13 11:12:28 -0500 |
---|---|---|
committer | Siddharth Ravikumar <sravik@bgsu.edu> | 2015-02-13 11:12:28 -0500 |
commit | b15e57265e8593e3a085f0b44858f60878289435 (patch) | |
tree | 8c6befb36df33812639b2c32c0a6975f62d98c32 /tests | |
parent | c9a5290224dd7254a23cb6e5e3baa43a21fd2362 (diff) |
All the tests now remove the node directories (tests/shard-dir-0 & tests/shard-dir-1) in the teardown method.
modified: tests/config_test.py
modified: tests/crypto_test.py
modified: tests/events_test.py
modified: tests/file_test.py
modified: tests/silo_test.py
deleted: tests/shard-dir-0/.foo
deleted: tests/shard-dir-1/.foo
Diffstat (limited to 'tests')
-rw-r--r-- | tests/config_test.py | 4 | ||||
-rw-r--r-- | tests/crypto_test.py | 3 | ||||
-rw-r--r-- | tests/events_test.py | 4 | ||||
-rw-r--r-- | tests/file_test.py | 3 | ||||
-rw-r--r-- | tests/shard-dir-0/.foo | 0 | ||||
-rw-r--r-- | tests/shard-dir-1/.foo | 0 | ||||
-rw-r--r-- | tests/silo_test.py | 3 |
7 files changed, 12 insertions, 5 deletions
diff --git a/tests/config_test.py b/tests/config_test.py index e76cede..f69f4e6 100644 --- a/tests/config_test.py +++ b/tests/config_test.py @@ -22,7 +22,7 @@ from nose.tools import * from os import path, remove, rmdir from combox.config import (config_cb, get_secret, get_stdin) -from tests.utils import get_input_func +from tests.utils import get_input_func, rm_nodedirs, get_config class TestConfig(object): @@ -36,6 +36,7 @@ class TestConfig(object): self.CONFIG_DIR = path.join('tests', 'test-config') self.config_file = path.join(self.CONFIG_DIR, 'config.yaml') + def test_config(self): "Tests the combox's config function." @@ -57,3 +58,4 @@ class TestConfig(object): def teardown_class(self): """Tear everything down.""" remove(self.config_file) + rm_nodedirs(get_config()) diff --git a/tests/crypto_test.py b/tests/crypto_test.py index 8712afe..00682b3 100644 --- a/tests/crypto_test.py +++ b/tests/crypto_test.py @@ -27,7 +27,7 @@ from shutil import copyfile from combox.config import get_nodedirs from combox.crypto import * from combox.file import * -from tests.utils import get_config +from tests.utils import get_config, rm_nodedirs class TestCrypto(object): @@ -119,3 +119,4 @@ class TestCrypto(object): rm_shards(self.TEST_FILE, self.config) remove(self.TEST_FILE_COPY) + rm_nodedirs(self.config) diff --git a/tests/events_test.py b/tests/events_test.py index cdcdb09..89b2033 100644 --- a/tests/events_test.py +++ b/tests/events_test.py @@ -37,7 +37,7 @@ from combox.file import (relative_path, purge_dir, from combox.silo import ComboxSilo from tests.utils import (get_config, shardedp, dirp, renamedp, - path_deletedp) + path_deletedp, rm_nodedirs) class TestEvents(object): @@ -240,3 +240,5 @@ class TestEvents(object): silo.remove(self.ipsum) silo.remove(self.TEST_FILE) + + rm_nodedirs(self.config) diff --git a/tests/file_test.py b/tests/file_test.py index e08dafa..04670f2 100644 --- a/tests/file_test.py +++ b/tests/file_test.py @@ -27,7 +27,7 @@ from combox.config import get_nodedirs from combox.file import (split_data, glue_data, write_file, read_file, write_shards, read_shards, hash_file, rm_shards) -from tests.utils import get_config +from tests.utils import get_config, rm_nodedirs class TestFile(object): @@ -100,3 +100,4 @@ class TestFile(object): """Purge the mess created by this test.""" rm_shards(self.TEST_FILE, self.config) + rm_nodedirs(self.config) diff --git a/tests/shard-dir-0/.foo b/tests/shard-dir-0/.foo deleted file mode 100644 index e69de29..0000000 --- a/tests/shard-dir-0/.foo +++ /dev/null diff --git a/tests/shard-dir-1/.foo b/tests/shard-dir-1/.foo deleted file mode 100644 index e69de29..0000000 --- a/tests/shard-dir-1/.foo +++ /dev/null diff --git a/tests/silo_test.py b/tests/silo_test.py index 24ac5d9..7e0eb40 100644 --- a/tests/silo_test.py +++ b/tests/silo_test.py @@ -24,7 +24,7 @@ from os import path, remove from combox.silo import ComboxSilo from combox.file import read_file, write_file -from tests.utils import get_config +from tests.utils import get_config, rm_nodedirs class TestSilo(object): """ @@ -98,3 +98,4 @@ class TestSilo(object): csilo = ComboxSilo(self.config) csilo.remove(self.LOREM) csilo.remove(self.IPSUM) + rm_nodedirs(self.config) |