|
8 | 8 |
|
9 | 9 | classExcludeTest(ProbackupTest,unittest.TestCase): |
10 | 10 |
|
| 11 | +# @unittest.skip("skip") |
| 12 | +deftest_exclude_temp_files(self): |
| 13 | +""" |
| 14 | + """ |
| 15 | +fname=self.id().split('.')[3] |
| 16 | +backup_dir=os.path.join(self.tmp_path,module_name,fname,'backup') |
| 17 | +node=self.make_simple_node( |
| 18 | +base_dir=os.path.join(module_name,fname,'node'), |
| 19 | +set_replication=True, |
| 20 | +initdb_params=['--data-checksums'], |
| 21 | +pg_options={ |
| 22 | +'logging_collector':'on', |
| 23 | +'log_filename':'postgresql.log'}) |
| 24 | + |
| 25 | +self.init_pb(backup_dir) |
| 26 | +self.add_instance(backup_dir,'node',node) |
| 27 | +node.slow_start() |
| 28 | + |
| 29 | +oid=node.safe_psql( |
| 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') |
| 34 | +withopen(file,'w')asf: |
| 35 | +f.write("HELLO") |
| 36 | +f.flush() |
| 37 | +f.close |
| 38 | + |
| 39 | +full_id=self.backup_node( |
| 40 | +backup_dir,'node',node,backup_type='full',options=['--stream']) |
| 41 | + |
| 42 | +file=os.path.join( |
| 43 | +backup_dir,'backups','node',full_id, |
| 44 | +'database','base',oid,'pgsql_tmp7351.16') |
| 45 | +self.assertFalse(os.path.exists(file)) |
| 46 | + |
| 47 | +# Clean after yourself |
| 48 | +self.del_test_dir(module_name,fname) |
| 49 | + |
11 | 50 | # @unittest.skip("skip") |
12 | 51 | # @unittest.expectedFailure |
13 | 52 | deftest_exclude_temp_tables(self): |
|