summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSiddharth Ravikumar <sravik@bgsu.edu>2015-04-08 16:20:25 -0400
committerSiddharth Ravikumar <sravik@bgsu.edu>2015-04-08 16:20:25 -0400
commit5729f1b0b3fd1f04f9f6e1787df3dbb74964a404 (patch)
treeb5d9966e5c411f6085b66b43bbf69da957d21de5 /tests
parentdddb7f8a622ecb80da38291e056f66a973cb5148 (diff)
Added test for directory creation in tests.events_test.TestEvents.test_NDM_oncreated.
modified: tests/events_test.py
Diffstat (limited to 'tests')
-rw-r--r--tests/events_test.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/events_test.py b/tests/events_test.py
index 1c0398d..d4df13d 100644
--- a/tests/events_test.py
+++ b/tests/events_test.py
@@ -275,6 +275,21 @@ class TestEvents(object):
## check if the new file's info is in silo
assert self.silo.exists(self.TEST_FILE_MUTANT)
+ # Test - directory creation
+ self.FOO_DIR = path.join(self.FILES_DIR, 'foo')
+ mk_nodedir(self.FOO_DIR, self.config)
+ time.sleep(1)
+ ## check if FOO_DIR is created under the combox directory
+ assert path.isdir(self.FOO_DIR)
+
+ self.BAR_DIR = path.join(self.FOO_DIR, 'bar')
+ mk_nodedir(self.BAR_DIR, self.config)
+ time.sleep(1)
+ ## check if BAR_DIR is created under the combox directory.
+ assert path.isdir(self.BAR_DIR)
+
+ self.purge_list.append(self.FOO_DIR)
+
for i in range(num_nodes):
observers[i].stop()
observers[i].join()
@@ -308,21 +323,6 @@ class TestEvents(object):
assert silo.exists(self.TEST_FILE_MUTANT)
####
- # Test - directory creation
- self.FOO_DIR = path.join(self.FILES_DIR, 'foo')
- mk_nodedir(self.FOO_DIR, self.config)
- time.sleep(1)
- ## check if FOO_DIR is created under the combox directory
- assert path.isdir(self.FOO_DIR)
-
- self.BAR_DIR = path.join(self.FOO_DIR, 'bar')
- mk_nodedir(self.BAR_DIR, self.config)
- time.sleep(1)
- ## check if BAR_DIR is created under the combox directory.
- assert path.isdir(self.BAR_DIR)
-
- self.purge_list.append(self.FOO_DIR)
-
# Test - Shard deletion.
rm_shards(self.TEST_FILE_MUTANT, self.config)
time.sleep(1)