We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentff2053b commit28dfccdCopy full SHA for 28dfccd
tests/exclude.py
@@ -30,7 +30,11 @@ def test_exclude_temp_files(self):
30
'postgres',
31
"select oid from pg_database where datname = 'postgres'").rstrip()
32
33
-file=os.path.join(node.data_dir,'base',oid,'pgsql_tmp7351.16')
+pgsql_tmp_dir=os.path.join(node.data_dir,'base','pgsql_tmp')
34
+
35
+os.mkdir(pgsql_tmp_dir)
36
37
+file=os.path.join(pgsql_tmp_dir,'pgsql_tmp7351.16')
38
withopen(file,'w')asf:
39
f.write("HELLO")
40
f.flush()
@@ -41,8 +45,13 @@ def test_exclude_temp_files(self):
41
45
42
46
file=os.path.join(
43
47
backup_dir,'backups','node',full_id,
44
-'database','base',oid,'pgsql_tmp7351.16')
-self.assertFalse(os.path.exists(file))
48
+'database','base','pgsql_tmp','pgsql_tmp7351.16')
49
50
+self.assertFalse(
51
+os.path.exists(file),
52
+"File must be excluded: {0}".format(file))
53
54
+# TODO check temporary tablespaces
55
56
# Clean after yourself
57
self.del_test_dir(module_name,fname)