Fix test comment and remove extra parameter
Fixed the comment in the test to match exactly what's being removed and what the expected result is. Also, removed that extra '/' parameter which was causing the assert to test at the wrong directory level. Change-Id: I2f27f0d12c08375c61047a3f861c94a3dd3915c6 Signed-off-by: Thiago da Silva <thiago@redhat.com>
This commit is contained in:
parent
c8a2b77313
commit
04502a9f64
@ -149,7 +149,9 @@ class TestReplicatorFunctions(ReplProbeTest):
|
|||||||
raise
|
raise
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
# Check behavior by deleting hashes.pkl file
|
# Delete directories and files in objects storage without
|
||||||
|
# deleting file "hashes.pkl".
|
||||||
|
# Check, that files not replicated.
|
||||||
for directory in os.listdir(os.path.join(test_node, data_dir)):
|
for directory in os.listdir(os.path.join(test_node, data_dir)):
|
||||||
for input_dir in os.listdir(os.path.join(
|
for input_dir in os.listdir(os.path.join(
|
||||||
test_node, data_dir, directory)):
|
test_node, data_dir, directory)):
|
||||||
@ -168,13 +170,15 @@ class TestReplicatorFunctions(ReplProbeTest):
|
|||||||
test_node, data_dir, directory)):
|
test_node, data_dir, directory)):
|
||||||
self.assertFalse(os.path.isdir(
|
self.assertFalse(os.path.isdir(
|
||||||
os.path.join(test_node, data_dir,
|
os.path.join(test_node, data_dir,
|
||||||
directory, '/', input_dir)))
|
directory, input_dir)))
|
||||||
break
|
break
|
||||||
except Exception:
|
except Exception:
|
||||||
if time.time() - begin > 60:
|
if time.time() - begin > 60:
|
||||||
raise
|
raise
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
|
# Now, delete file "hashes.pkl".
|
||||||
|
# Check, that all files were replicated.
|
||||||
for directory in os.listdir(os.path.join(test_node, data_dir)):
|
for directory in os.listdir(os.path.join(test_node, data_dir)):
|
||||||
os.remove(os.path.join(
|
os.remove(os.path.join(
|
||||||
test_node, data_dir, directory, 'hashes.pkl'))
|
test_node, data_dir, directory, 'hashes.pkl'))
|
||||||
|
Loading…
Reference in New Issue
Block a user