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

Appearance settings

Commit 8c670f0

Browse filesBrowse files
committed
move test_basic_full_backup => test_full_backup
run it in separate travis action + add same test with stream replication
1 parent 348283b commit 8c670f0
Copy full SHA for 8c670f0

File tree

2 files changed

+35
-2
lines changed
Filter options

2 files changed

+35
-2
lines changed

‎.travis.yml

Copy file name to clipboardExpand all lines: .travis.yml
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ env:
3535
- PG_VERSION=10 PG_BRANCH=REL_10_STABLE
3636
- PG_VERSION=9.6 PG_BRANCH=REL9_6_STABLE
3737
- PG_VERSION=9.5 PG_BRANCH=REL9_5_STABLE
38-
# - PG_VERSION=13 PG_BRANCH=REL_13_STABLE PTRACK_PATCH_PG_BRANCH=OFF MODE=archive
38+
- PG_VERSION=15 PG_BRANCH=REL_15_STABLE PTRACK_PATCH_PG_BRANCH=OFF MODE=backup.BackupTest.test_full_backup
39+
- PG_VERSION=15 PG_BRANCH=REL_15_STABLE PTRACK_PATCH_PG_BRANCH=OFF MODE=backup.BackupTest.test_full_backup_stream
3940
# - PG_VERSION=13 PG_BRANCH=REL_13_STABLE PTRACK_PATCH_PG_BRANCH=REL_13_STABLE MODE=backup
4041
# - PG_VERSION=13 PG_BRANCH=REL_13_STABLE PTRACK_PATCH_PG_BRANCH=REL_13_STABLE MODE=catchup
4142
# - PG_VERSION=13 PG_BRANCH=REL_13_STABLE PTRACK_PATCH_PG_BRANCH=REL_13_STABLE MODE=checkdb

‎tests/backup.py

Copy file name to clipboardExpand all lines: tests/backup.py
+33-1Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
class BackupTest(ProbackupTest, unittest.TestCase):
1515

16-
def test_basic_full_backup(self):
16+
def test_full_backup(self):
1717
"""
1818
Just test full backup with at least two segments
1919
"""
@@ -45,6 +45,38 @@ def test_basic_full_backup(self):
4545
# Clean after yourself
4646
self.del_test_dir(module_name, fname)
4747

48+
def test_full_backup_stream(self):
49+
"""
50+
Just test full backup with at least two segments in stream mode
51+
"""
52+
fname = self.id().split('.')[3]
53+
node = self.make_simple_node(
54+
base_dir=os.path.join(module_name, fname, 'node'),
55+
initdb_params=['--data-checksums'],
56+
# we need to write a lot. Lets speedup a bit.
57+
pg_options={"fsync": "off", "synchronous_commit": "off"})
58+
59+
backup_dir = os.path.join(self.tmp_path, module_name, fname, 'backup')
60+
self.init_pb(backup_dir)
61+
self.add_instance(backup_dir, 'node', node)
62+
node.slow_start()
63+
64+
# Fill with data
65+
# Have to use scale=100 to create second segment.
66+
node.pgbench_init(scale=100, no_vacuum=True)
67+
68+
# FULL
69+
backup_id = self.backup_node(backup_dir, 'node', node,
70+
options=["--stream"])
71+
72+
out = self.validate_pb(backup_dir, 'node', backup_id)
73+
self.assertIn(
74+
"INFO: Backup {0} is valid".format(backup_id),
75+
out)
76+
77+
# Clean after yourself
78+
self.del_test_dir(module_name, fname)
79+
4880
# @unittest.skip("skip")
4981
# @unittest.expectedFailure
5082
# PGPRO-707

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.