Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit284613b

Browse files
committed
tests: added tests.backup.BackupTest.test_drop_table
1 parentb2fdd73 commit284613b

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

‎tests/backup.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,3 +1246,38 @@ def test_sigquit_handling(self):
12461246

12471247
# Clean after yourself
12481248
self.del_test_dir(module_name,fname)
1249+
1250+
# @unittest.skip("skip")
1251+
deftest_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)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp