You've already forked pg_probackup
mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2026-06-21 01:34:15 +02:00
Merge branch 'REL_2_5' into REL_2_6
This commit is contained in:
@@ -33,6 +33,8 @@ env:
|
||||
- PG_VERSION=12 PG_BRANCH=REL_12_STABLE PTRACK_PATCH_PG_BRANCH=REL_12_STABLE
|
||||
- PG_VERSION=11 PG_BRANCH=REL_11_STABLE PTRACK_PATCH_PG_BRANCH=REL_11_STABLE
|
||||
- PG_VERSION=10 PG_BRANCH=REL_10_STABLE
|
||||
- PG_VERSION=15 PG_BRANCH=REL_15_STABLE PTRACK_PATCH_PG_BRANCH=OFF MODE=backup.BackupTest.test_full_backup
|
||||
- PG_VERSION=15 PG_BRANCH=REL_15_STABLE PTRACK_PATCH_PG_BRANCH=OFF MODE=backup.BackupTest.test_full_backup_stream
|
||||
# - PG_VERSION=13 PG_BRANCH=REL_13_STABLE PTRACK_PATCH_PG_BRANCH=OFF MODE=archive
|
||||
# - PG_VERSION=13 PG_BRANCH=REL_13_STABLE PTRACK_PATCH_PG_BRANCH=REL_13_STABLE MODE=backup
|
||||
# - PG_VERSION=13 PG_BRANCH=REL_13_STABLE PTRACK_PATCH_PG_BRANCH=REL_13_STABLE MODE=catchup
|
||||
|
||||
+33
-1
@@ -13,7 +13,7 @@ module_name = 'backup'
|
||||
|
||||
class BackupTest(ProbackupTest, unittest.TestCase):
|
||||
|
||||
def test_basic_full_backup(self):
|
||||
def test_full_backup(self):
|
||||
"""
|
||||
Just test full backup with at least two segments
|
||||
"""
|
||||
@@ -45,6 +45,38 @@ class BackupTest(ProbackupTest, unittest.TestCase):
|
||||
# Clean after yourself
|
||||
self.del_test_dir(module_name, fname)
|
||||
|
||||
def test_full_backup_stream(self):
|
||||
"""
|
||||
Just test full backup with at least two segments in stream mode
|
||||
"""
|
||||
fname = self.id().split('.')[3]
|
||||
node = self.make_simple_node(
|
||||
base_dir=os.path.join(module_name, fname, 'node'),
|
||||
initdb_params=['--data-checksums'],
|
||||
# we need to write a lot. Lets speedup a bit.
|
||||
pg_options={"fsync": "off", "synchronous_commit": "off"})
|
||||
|
||||
backup_dir = os.path.join(self.tmp_path, module_name, fname, 'backup')
|
||||
self.init_pb(backup_dir)
|
||||
self.add_instance(backup_dir, 'node', node)
|
||||
node.slow_start()
|
||||
|
||||
# Fill with data
|
||||
# Have to use scale=100 to create second segment.
|
||||
node.pgbench_init(scale=100, no_vacuum=True)
|
||||
|
||||
# FULL
|
||||
backup_id = self.backup_node(backup_dir, 'node', node,
|
||||
options=["--stream"])
|
||||
|
||||
out = self.validate_pb(backup_dir, 'node', backup_id)
|
||||
self.assertIn(
|
||||
"INFO: Backup {0} is valid".format(backup_id),
|
||||
out)
|
||||
|
||||
# Clean after yourself
|
||||
self.del_test_dir(module_name, fname)
|
||||
|
||||
# @unittest.skip("skip")
|
||||
# @unittest.expectedFailure
|
||||
# PGPRO-707
|
||||
|
||||
Reference in New Issue
Block a user