postgres_ffi: test restoring from intermediate LSNs by wal_craft

This commit is contained in:
Egor Suvorov
2022-07-09 14:37:08 +03:00
committed by Egor Suvorov
parent 19ea486cde
commit 94003e1ebc
4 changed files with 77 additions and 32 deletions

View File

@@ -1276,12 +1276,9 @@ class WalCraft(AbstractNeonCli):
res.check_returncode()
return res.stdout.split('\n')
def in_existing(self, type: str, connection: str) -> int:
def in_existing(self, type: str, connection: str) -> None:
res = self.raw_cli(["in-existing", type, connection])
res.check_returncode()
m = re.fullmatch(r'end_of_wal = (.*)\n', res.stdout)
assert m
return lsn_from_hex(m.group(1))
class NeonPageserver(PgProtocol):