File tree 1 file changed +35
-0
lines changed
1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -1246,3 +1246,38 @@ def test_sigquit_handling(self):
1246
1246
1247
1247
# Clean after yourself
1248
1248
self .del_test_dir (module_name , fname )
1249
+
1250
+ # @unittest.skip("skip")
1251
+ def test_drop_table (self ):
1252
+ """"""
1253
+ fname = self .id ().split ('.' )[3 ]
1254
+ backup_dir = os .path .join (self .tmp_path , module_name , fname , 'backup' )
1255
+ node = self .make_simple_node (
1256
+ base_dir = os .path .join (module_name , fname , 'node' ),
1257
+ set_replication = True ,
1258
+ initdb_params = ['--data-checksums' ])
1259
+
1260
+ self .init_pb (backup_dir )
1261
+ self .add_instance (backup_dir , 'node' , node )
1262
+ node .slow_start ()
1263
+
1264
+ connect_1 = node .connect ("postgres" )
1265
+ connect_1 .execute (
1266
+ "create table t_heap as select i"
1267
+ " as id from generate_series(0,100) i" )
1268
+ connect_1 .commit ()
1269
+
1270
+ connect_2 = node .connect ("postgres" )
1271
+ connect_2 .execute ("SELECT * FROM t_heap" )
1272
+ connect_2 .commit ()
1273
+
1274
+ # DROP table
1275
+ connect_2 .execute ("DROP TABLE t_heap" )
1276
+ connect_2 .commit ()
1277
+
1278
+ # FULL backup
1279
+ self .backup_node (
1280
+ backup_dir , 'node' , node , options = ['--stream' ])
1281
+
1282
+ # Clean after yourself
1283
+ self .del_test_dir (module_name , fname )
You can’t perform that action at this time.
0 commit comments