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

Commitde411ed

Browse files
committed
Merge branch 'REL_2_5_correct_test_skip' into REL_2_5
2 parents457e062 +b7bd831 commitde411ed

File tree

15 files changed

+70
-63
lines changed

15 files changed

+70
-63
lines changed

‎tests/archive.py‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def test_pgpro434_2(self):
8686

8787
ifself.get_version(node)<self.version_to_num('9.6.0'):
8888
self.del_test_dir(module_name,fname)
89-
returnunittest.skip(
89+
self.skipTest(
9090
'Skipped because pg_control_checkpoint() is not supported in PG 9.5')
9191

9292
self.init_pb(backup_dir)
@@ -717,7 +717,7 @@ def test_replica_archive(self):
717717

718718
ifself.get_version(master)<self.version_to_num('9.6.0'):
719719
self.del_test_dir(module_name,fname)
720-
returnunittest.skip(
720+
self.skipTest(
721721
'Skipped because backup from replica is not supported in PG 9.5')
722722

723723
self.init_pb(backup_dir)
@@ -848,7 +848,7 @@ def test_master_and_replica_parallel_archiving(self):
848848

849849
ifself.get_version(master)<self.version_to_num('9.6.0'):
850850
self.del_test_dir(module_name,fname)
851-
returnunittest.skip(
851+
self.skipTest(
852852
'Skipped because backup from replica is not supported in PG 9.5')
853853

854854
replica=self.make_simple_node(
@@ -929,7 +929,7 @@ def test_basic_master_and_replica_concurrent_archiving(self):
929929
make sure that archiving on both node is working.
930930
"""
931931
ifself.pg_config_version<self.version_to_num('9.6.0'):
932-
returnunittest.skip('You need PostgreSQL >= 9.6 for this test')
932+
self.skipTest('You need PostgreSQL >= 9.6 for this test')
933933

934934
fname=self.id().split('.')[3]
935935
backup_dir=os.path.join(self.tmp_path,module_name,fname,'backup')
@@ -943,7 +943,7 @@ def test_basic_master_and_replica_concurrent_archiving(self):
943943

944944
ifself.get_version(master)<self.version_to_num('9.6.0'):
945945
self.del_test_dir(module_name,fname)
946-
returnunittest.skip(
946+
self.skipTest(
947947
'Skipped because backup from replica is not supported in PG 9.5')
948948

949949
replica=self.make_simple_node(
@@ -1035,7 +1035,7 @@ def test_concurrent_archiving(self):
10351035
"""
10361036

10371037
ifself.pg_config_version<self.version_to_num('11.0'):
1038-
returnunittest.skip('You need PostgreSQL >= 11 for this test')
1038+
self.skipTest('You need PostgreSQL >= 11 for this test')
10391039

10401040
fname=self.id().split('.')[3]
10411041
backup_dir=os.path.join(self.tmp_path,module_name,fname,'backup')
@@ -1196,7 +1196,7 @@ def test_archive_pg_receivexlog_compression_pg10(self):
11961196
self.add_instance(backup_dir,'node',node)
11971197
node.slow_start()
11981198
ifself.get_version(node)<self.version_to_num('10.0'):
1199-
returnunittest.skip('You need PostgreSQL >= 10 for this test')
1199+
self.skipTest('You need PostgreSQL >= 10 for this test')
12001200
else:
12011201
pg_receivexlog_path=self.get_bin_path('pg_receivewal')
12021202

@@ -1278,7 +1278,7 @@ def test_archive_catalog(self):
12781278

12791279
ifself.get_version(master)<self.version_to_num('9.6.0'):
12801280
self.del_test_dir(module_name,fname)
1281-
returnunittest.skip(
1281+
self.skipTest(
12821282
'Skipped because backup from replica is not supported in PG 9.5')
12831283

12841284
self.init_pb(backup_dir)
@@ -1938,7 +1938,7 @@ def test_waldir_outside_pgdata_archiving(self):
19381938
check that archive-push works correct with symlinked waldir
19391939
"""
19401940
ifself.pg_config_version<self.version_to_num('10.0'):
1941-
returnunittest.skip(
1941+
self.skipTest(
19421942
'Skipped because waldir outside pgdata is supported since PG 10')
19431943

19441944
fname=self.id().split('.')[3]
@@ -2176,7 +2176,7 @@ def test_archive_pg_receivexlog_partial_handling(self):
21762176

21772177
ifself.get_version(node)<self.version_to_num('9.6.0'):
21782178
self.del_test_dir(module_name,fname)
2179-
returnunittest.skip(
2179+
self.skipTest(
21802180
'Skipped because backup from replica is not supported in PG 9.5')
21812181

21822182
self.init_pb(backup_dir)
@@ -2385,7 +2385,7 @@ def test_archive_get_batching_sanity(self):
23852385

23862386
ifself.get_version(node)<self.version_to_num('9.6.0'):
23872387
self.del_test_dir(module_name,fname)
2388-
returnunittest.skip(
2388+
self.skipTest(
23892389
'Skipped because backup from replica is not supported in PG 9.5')
23902390

23912391
self.init_pb(backup_dir)

‎tests/backup.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1460,7 +1460,7 @@ def test_basic_temp_slot_for_stream_backup(self):
14601460
pg_options={'max_wal_size':'40MB'})
14611461

14621462
ifself.get_version(node)<self.version_to_num('10.0'):
1463-
returnunittest.skip('You need PostgreSQL >= 10 for this test')
1463+
self.skipTest('You need PostgreSQL >= 10 for this test')
14641464

14651465
self.init_pb(backup_dir)
14661466
self.add_instance(backup_dir,'node',node)
@@ -1532,7 +1532,7 @@ def test_backup_concurrent_drop_table(self):
15321532
deftest_pg_11_adjusted_wal_segment_size(self):
15331533
""""""
15341534
ifself.pg_config_version<self.version_to_num('11.0'):
1535-
returnunittest.skip('You need PostgreSQL >= 11 for this test')
1535+
self.skipTest('You need PostgreSQL >= 11 for this test')
15361536

15371537
fname=self.id().split('.')[3]
15381538
backup_dir=os.path.join(self.tmp_path,module_name,fname,'backup')
@@ -1775,7 +1775,7 @@ def test_drop_table(self):
17751775
deftest_basic_missing_file_permissions(self):
17761776
""""""
17771777
ifos.name=='nt':
1778-
returnunittest.skip('Skipped because it is POSIX only test')
1778+
self.skipTest('Skipped because it is POSIX only test')
17791779

17801780
fname=self.id().split('.')[3]
17811781
backup_dir=os.path.join(self.tmp_path,module_name,fname,'backup')
@@ -1822,7 +1822,7 @@ def test_basic_missing_file_permissions(self):
18221822
deftest_basic_missing_dir_permissions(self):
18231823
""""""
18241824
ifos.name=='nt':
1825-
returnunittest.skip('Skipped because it is POSIX only test')
1825+
self.skipTest('Skipped because it is POSIX only test')
18261826

18271827
fname=self.id().split('.')[3]
18281828
backup_dir=os.path.join(self.tmp_path,module_name,fname,'backup')

‎tests/catchup.py‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def test_basic_ptrack_catchup(self):
190190
Test ptrack catchup
191191
"""
192192
ifnotself.ptrack:
193-
returnunittest.skip('Skipped because ptrack support is disabled')
193+
self.skipTest('Skipped because ptrack support is disabled')
194194

195195
# preparation 1: source
196196
src_pg=self.make_simple_node(
@@ -336,7 +336,7 @@ def test_tli_ptrack_catchup(self):
336336
Test that we correctly follow timeline change with ptrack catchup
337337
"""
338338
ifnotself.ptrack:
339-
returnunittest.skip('Skipped because ptrack support is disabled')
339+
self.skipTest('Skipped because ptrack support is disabled')
340340

341341
# preparation 1: source
342342
src_pg=self.make_simple_node(
@@ -475,7 +475,7 @@ def test_table_drop_with_ptrack(self):
475475
Test that dropped table in source will be dropped in ptrack catchup'ed instance too
476476
"""
477477
ifnotself.ptrack:
478-
returnunittest.skip('Skipped because ptrack support is disabled')
478+
self.skipTest('Skipped because ptrack support is disabled')
479479

480480
# preparation 1: source
481481
src_pg=self.make_simple_node(
@@ -590,7 +590,7 @@ def test_tablefile_truncation_with_ptrack(self):
590590
Test that truncated table in source will be truncated in ptrack catchup'ed instance too
591591
"""
592592
ifnotself.ptrack:
593-
returnunittest.skip('Skipped because ptrack support is disabled')
593+
self.skipTest('Skipped because ptrack support is disabled')
594594

595595
# preparation 1: source
596596
src_pg=self.make_simple_node(
@@ -655,7 +655,7 @@ def test_local_tablespace_without_mapping(self):
655655
Test that we detect absence of needed --tablespace-mapping option
656656
"""
657657
ifself.remote:
658-
returnunittest.skip('Skipped because this test tests local catchup error handling')
658+
self.skipTest('Skipped because this test tests local catchup error handling')
659659

660660
src_pg=self.make_simple_node(base_dir=os.path.join(module_name,self.fname,'src'))
661661
src_pg.slow_start()
@@ -1035,7 +1035,7 @@ def test_unclean_ptrack_catchup(self):
10351035
Test that we correctly recover uncleanly shutdowned destination
10361036
"""
10371037
ifnotself.ptrack:
1038-
returnunittest.skip('Skipped because ptrack support is disabled')
1038+
self.skipTest('Skipped because ptrack support is disabled')
10391039

10401040
# preparation 1: source
10411041
src_pg=self.make_simple_node(
@@ -1507,7 +1507,7 @@ def test_dry_run_catchup_ptrack(self):
15071507
Test dry-run option for catchup in incremental ptrack mode
15081508
"""
15091509
ifnotself.ptrack:
1510-
returnunittest.skip('Skipped because ptrack support is disabled')
1510+
self.skipTest('Skipped because ptrack support is disabled')
15111511

15121512
# preparation 1: source
15131513
src_pg=self.make_simple_node(

‎tests/compatibility.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ def test_backward_compatibility_ptrack(self):
366366
"""Description in jira issue PGPRO-434"""
367367

368368
ifnotself.ptrack:
369-
returnunittest.skip('Skipped because ptrack support is disabled')
369+
self.skipTest('Skipped because ptrack support is disabled')
370370

371371
fname=self.id().split('.')[3]
372372
backup_dir=os.path.join(self.tmp_path,module_name,fname,'backup')

‎tests/delete.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def test_delete_increment_page(self):
189189
deftest_delete_increment_ptrack(self):
190190
"""delete increment and all after him"""
191191
ifnotself.ptrack:
192-
returnunittest.skip('Skipped because ptrack support is disabled')
192+
self.skipTest('Skipped because ptrack support is disabled')
193193

194194
fname=self.id().split('.')[3]
195195
node=self.make_simple_node(

‎tests/external.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1535,7 +1535,7 @@ def test_external_dir_is_symlink(self):
15351535
but restored as directory
15361536
"""
15371537
ifos.name=='nt':
1538-
returnunittest.skip('Skipped for Windows')
1538+
self.skipTest('Skipped for Windows')
15391539

15401540
fname=self.id().split('.')[3]
15411541
backup_dir=os.path.join(self.tmp_path,module_name,fname,'backup')
@@ -1618,7 +1618,7 @@ def test_external_dir_contain_symlink_on_dir(self):
16181618
but restored as directory
16191619
"""
16201620
ifos.name=='nt':
1621-
returnunittest.skip('Skipped for Windows')
1621+
self.skipTest('Skipped for Windows')
16221622

16231623
fname=self.id().split('.')[3]
16241624
backup_dir=os.path.join(self.tmp_path,module_name,fname,'backup')
@@ -1703,7 +1703,7 @@ def test_external_dir_contain_symlink_on_file(self):
17031703
but restored as directory
17041704
"""
17051705
ifos.name=='nt':
1706-
returnunittest.skip('Skipped for Windows')
1706+
self.skipTest('Skipped for Windows')
17071707

17081708
fname=self.id().split('.')[3]
17091709
backup_dir=os.path.join(self.tmp_path,module_name,fname,'backup')

‎tests/false_positive.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def test_pg_10_waldir(self):
114114
test group access for PG >= 11
115115
"""
116116
ifself.pg_config_version<self.version_to_num('10.0'):
117-
returnunittest.skip('You need PostgreSQL >= 10 for this test')
117+
self.skipTest('You need PostgreSQL >= 10 for this test')
118118

119119
fname=self.id().split('.')[3]
120120
wal_dir=os.path.join(

‎tests/helpers/__init__.py‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
__all__= ['ptrack_helpers','cfs_helpers','expected_errors']
2-
#from . import *
2+
3+
importunittest
4+
5+
# python 2.7 compatibility
6+
ifnothasattr(unittest.TestCase,"skipTest"):
7+
defskipTest(self,reason):
8+
raiseunittest.SkipTest(reason)
9+
unittest.TestCase.skipTest=skipTest

‎tests/incr_restore.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,7 +1494,7 @@ def test_make_replica_via_incr_checksum_restore(self):
14941494

14951495
ifself.get_version(master)<self.version_to_num('9.6.0'):
14961496
self.del_test_dir(module_name,fname)
1497-
returnunittest.skip(
1497+
self.skipTest(
14981498
'Skipped because backup from replica is not supported in PG 9.5')
14991499

15001500
self.init_pb(backup_dir)
@@ -1567,7 +1567,7 @@ def test_make_replica_via_incr_lsn_restore(self):
15671567

15681568
ifself.get_version(master)<self.version_to_num('9.6.0'):
15691569
self.del_test_dir(module_name,fname)
1570-
returnunittest.skip(
1570+
self.skipTest(
15711571
'Skipped because backup from replica is not supported in PG 9.5')
15721572

15731573
self.init_pb(backup_dir)

‎tests/merge.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ def test_merge_ptrack_truncate(self):
796796
restore last page backup and check data correctness
797797
"""
798798
ifnotself.ptrack:
799-
returnunittest.skip('Skipped because ptrack support is disabled')
799+
self.skipTest('Skipped because ptrack support is disabled')
800800

801801
fname=self.id().split('.')[3]
802802
backup_dir=os.path.join(self.tmp_path,module_name,fname,'backup')

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp