Remove some unnecessary fixture arguments

This commit is contained in:
Heikki Linnakangas
2021-10-25 14:14:45 +03:00
parent f337d73a6c
commit 28af3e5008
9 changed files with 7 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
from contextlib import closing from contextlib import closing
from fixtures.zenith_fixtures import PostgresFactory, ZenithPageserver from fixtures.zenith_fixtures import PostgresFactory
from fixtures.log_helper import log from fixtures.log_helper import log
pytest_plugins = ("fixtures.zenith_fixtures") pytest_plugins = ("fixtures.zenith_fixtures")
@@ -9,7 +9,7 @@ pytest_plugins = ("fixtures.zenith_fixtures")
# #
# Test starting Postgres with custom options # Test starting Postgres with custom options
# #
def test_config(zenith_cli, pageserver: ZenithPageserver, postgres: PostgresFactory, pg_bin): def test_config(zenith_cli, postgres: PostgresFactory):
# Create a branch for us # Create a branch for us
zenith_cli.run(["branch", "test_config", "empty"]) zenith_cli.run(["branch", "test_config", "empty"])

View File

@@ -101,4 +101,4 @@ def test_dropdb(
assert os.path.isdir(dbpath) == False assert os.path.isdir(dbpath) == False
# Check that we restore the content of the datadir correctly # Check that we restore the content of the datadir correctly
check_restored_datadir_content(zenith_cli, test_output_dir, pg, pageserver.service_port.pg) check_restored_datadir_content(test_output_dir, pg, pageserver.service_port.pg)

View File

@@ -71,4 +71,4 @@ def test_multixact(pageserver: ZenithPageserver,
assert next_multixact_id_new == next_multixact_id assert next_multixact_id_new == next_multixact_id
# Check that we restore the content of the datadir correctly # Check that we restore the content of the datadir correctly
check_restored_datadir_content(zenith_cli, test_output_dir, pg_new, pageserver.service_port.pg) check_restored_datadir_content(test_output_dir, pg_new, pageserver.service_port.pg)

View File

@@ -59,4 +59,4 @@ def test_pg_regress(pageserver: ZenithPageserver,
lsn = pg.safe_psql('select pg_current_wal_insert_lsn()')[0][0] lsn = pg.safe_psql('select pg_current_wal_insert_lsn()')[0][0]
# Check that we restore the content of the datadir correctly # Check that we restore the content of the datadir correctly
check_restored_datadir_content(zenith_cli, test_output_dir, pg, pageserver.service_port.pg) check_restored_datadir_content(test_output_dir, pg, pageserver.service_port.pg)

View File

@@ -65,4 +65,4 @@ def test_zenith_regress(postgres: PostgresFactory,
lsn = pg.safe_psql('select pg_current_wal_insert_lsn()')[0][0] lsn = pg.safe_psql('select pg_current_wal_insert_lsn()')[0][0]
# Check that we restore the content of the datadir correctly # Check that we restore the content of the datadir correctly
check_restored_datadir_content(zenith_cli, test_output_dir, pg, pageserver_port.pg) check_restored_datadir_content(test_output_dir, pg, pageserver_port.pg)

View File

@@ -1157,10 +1157,7 @@ def list_files_to_compare(pgdata_dir: str):
# pg is the existing and running compute node, that we want to compare with a basebackup # pg is the existing and running compute node, that we want to compare with a basebackup
def check_restored_datadir_content(zenith_cli: ZenithCli, def check_restored_datadir_content(test_output_dir: str, pg: Postgres, pageserver_pg_port: int):
test_output_dir: str,
pg: Postgres,
pageserver_pg_port: int):
# Get the timeline ID of our branch. We need it for the 'basebackup' command # Get the timeline ID of our branch. We need it for the 'basebackup' command
with closing(pg.connect()) as conn: with closing(pg.connect()) as conn:

View File

@@ -18,7 +18,6 @@ pytest_plugins = ("fixtures.zenith_fixtures", "fixtures.benchmark_fixture")
# #
def test_bulk_insert(postgres: PostgresFactory, def test_bulk_insert(postgres: PostgresFactory,
pageserver: ZenithPageserver, pageserver: ZenithPageserver,
pg_bin,
zenith_cli, zenith_cli,
zenbenchmark, zenbenchmark,
repo_dir: str): repo_dir: str):

View File

@@ -13,7 +13,6 @@ pytest_plugins = ("fixtures.zenith_fixtures", "fixtures.benchmark_fixture")
# #
def test_gist_buffering_build(postgres: PostgresFactory, def test_gist_buffering_build(postgres: PostgresFactory,
pageserver: ZenithPageserver, pageserver: ZenithPageserver,
pg_bin,
zenith_cli, zenith_cli,
zenbenchmark, zenbenchmark,
repo_dir: str): repo_dir: str):

View File

@@ -20,7 +20,6 @@ pytest_plugins = ("fixtures.zenith_fixtures", "fixtures.benchmark_fixture")
def test_write_amplification(postgres: PostgresFactory, def test_write_amplification(postgres: PostgresFactory,
pageserver: ZenithPageserver, pageserver: ZenithPageserver,
pg_bin,
zenith_cli, zenith_cli,
zenbenchmark, zenbenchmark,
repo_dir: str): repo_dir: str):