mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-08 05:52:55 +00:00
postgres_ffi/wal_generate: use 'craft' instead of 'generate'
It does very fine-tuned byte-to-byte WAL crafting, not a sloppy generation. Hence 'craft' sounds like a better description.
This commit is contained in:
committed by
Egor Suvorov
parent
1f5918b36d
commit
60e5dc10e6
@@ -1,4 +1,4 @@
|
||||
from fixtures.neon_fixtures import NeonEnvBuilder, WalGenerate
|
||||
from fixtures.neon_fixtures import NeonEnvBuilder, WalCraft
|
||||
from fixtures.log_helper import log
|
||||
import pytest
|
||||
|
||||
@@ -20,8 +20,8 @@ def test_crafted_wal_end(neon_env_builder: NeonEnvBuilder, wal_type: str):
|
||||
env.neon_cli.create_branch('test_crafted_wal_end')
|
||||
|
||||
pg = env.postgres.create('test_crafted_wal_end')
|
||||
gen = WalGenerate(env)
|
||||
pg.config(gen.postgres_config())
|
||||
wal_craft = WalCraft(env)
|
||||
pg.config(wal_craft.postgres_config())
|
||||
pg.start()
|
||||
res = pg.safe_psql_many(queries=[
|
||||
'CREATE TABLE keys(key int primary key)',
|
||||
@@ -30,7 +30,7 @@ def test_crafted_wal_end(neon_env_builder: NeonEnvBuilder, wal_type: str):
|
||||
])
|
||||
assert res[-1][0] == (5050, )
|
||||
|
||||
gen.in_existing(wal_type, pg.connstr())
|
||||
wal_craft.in_existing(wal_type, pg.connstr())
|
||||
|
||||
log.info("Restarting all safekeepers and pageservers")
|
||||
env.pageserver.stop()
|
||||
|
||||
@@ -1263,13 +1263,13 @@ class NeonCli(AbstractNeonCli):
|
||||
return self.raw_cli(args, check_return_code=check_return_code)
|
||||
|
||||
|
||||
class WalGenerate(AbstractNeonCli):
|
||||
class WalCraft(AbstractNeonCli):
|
||||
"""
|
||||
A typed wrapper around the `wal_generate` CLI tool.
|
||||
A typed wrapper around the `wal_craft` CLI tool.
|
||||
Supports main commands via typed methods and a way to run arbitrary command directly via CLI.
|
||||
"""
|
||||
|
||||
COMMAND = 'wal_generate'
|
||||
COMMAND = 'wal_craft'
|
||||
|
||||
def postgres_config(self) -> List[str]:
|
||||
res = self.raw_cli(["print-postgres-config"])
|
||||
|
||||
Reference in New Issue
Block a user