diff --git a/nix/tools/tests.nix b/nix/tools/tests.nix index e0a11851b..36bf27b03 100644 --- a/nix/tools/tests.nix +++ b/nix/tools/tests.nix @@ -83,7 +83,7 @@ let } '' ${cabal-install}/bin/cabal v2-build ${devCabalOptions} exe:postgrest - ${cabal-install}/bin/cabal v2-exec -- ${withTools.withPg} -f test/io/load.sql \ + ${cabal-install}/bin/cabal v2-exec -- ${withTools.withPg} -f test/io/fixtures/load.sql \ ${ioTestPython}/bin/pytest --ignore=test/io/test_big_schema.py --ignore=test/io/test_replica.py -v test/io "''${_arg_leftovers[@]}" ''; @@ -98,7 +98,7 @@ let } '' ${cabal-install}/bin/cabal v2-build ${devCabalOptions} exe:postgrest - ${cabal-install}/bin/cabal v2-exec -- ${withTools.withPg} -f test/io/big_schema.sql \ + ${cabal-install}/bin/cabal v2-exec -- ${withTools.withPg} -f test/io/fixtures/big_schema.sql \ ${ioTestPython}/bin/pytest -v test/io/test_big_schema.py "''${_arg_leftovers[@]}" ''; @@ -113,7 +113,7 @@ let } '' ${cabal-install}/bin/cabal v2-build ${devCabalOptions} exe:postgrest - ${cabal-install}/bin/cabal v2-exec -- ${withTools.withPg} --replica -f test/io/replica.sql \ + ${cabal-install}/bin/cabal v2-exec -- ${withTools.withPg} --replica -f test/io/fixtures/replica.sql \ ${ioTestPython}/bin/pytest -v test/io/test_replica.py "''${_arg_leftovers[@]}" ''; @@ -164,15 +164,15 @@ let # collect all tests HPCTIXFILE="$tmpdir"/io.tix \ - ${withTools.withPg} -f test/io/load.sql \ + ${withTools.withPg} -f test/io/fixtures/load.sql \ ${cabal-install}/bin/cabal v2-exec ${devCabalOptions} -- ${ioTestPython}/bin/pytest --ignore=test/io/test_big_schema.py --ignore=test/io/test_replica.py -v test/io HPCTIXFILE="$tmpdir"/big_schema.tix \ - ${withTools.withPg} -f test/io/big_schema.sql \ + ${withTools.withPg} -f test/io/fixtures/big_schema.sql \ ${cabal-install}/bin/cabal v2-exec ${devCabalOptions} -- ${ioTestPython}/bin/pytest -v test/io/test_big_schema.py HPCTIXFILE="$tmpdir"/replica.tix \ - ${withTools.withPg} --replica -f test/io/replica.sql \ + ${withTools.withPg} --replica -f test/io/fixtures/replica.sql \ ${cabal-install}/bin/cabal v2-exec ${devCabalOptions} -- ${ioTestPython}/bin/pytest -v test/io/test_replica.py HPCTIXFILE="$tmpdir"/spec.tix \ diff --git a/test/io/config.py b/test/io/config.py index 5c531b709..74d754d16 100644 --- a/test/io/config.py +++ b/test/io/config.py @@ -7,7 +7,9 @@ import yaml BASEDIR = pathlib.Path(os.path.realpath(__file__)).parent CONFIGSDIR = BASEDIR / "configs" -FIXTURES = yaml.load((BASEDIR / "fixtures.yaml").read_text(), Loader=yaml.Loader) +FIXTURES = yaml.load( + (BASEDIR / "fixtures/fixtures.yaml").read_text(), Loader=yaml.Loader +) POSTGREST_BIN = shutil.which("postgrest") SECRET = "reallyreallyreallyreallyverysafe" diff --git a/test/io/big_schema.sql b/test/io/fixtures/big_schema.sql similarity index 100% rename from test/io/big_schema.sql rename to test/io/fixtures/big_schema.sql diff --git a/test/io/db_config.sql b/test/io/fixtures/db_config.sql similarity index 100% rename from test/io/db_config.sql rename to test/io/fixtures/db_config.sql diff --git a/test/io/fixtures.yaml b/test/io/fixtures/fixtures.yaml similarity index 100% rename from test/io/fixtures.yaml rename to test/io/fixtures/fixtures.yaml diff --git a/test/io/fixtures.sql b/test/io/fixtures/load.sql similarity index 100% rename from test/io/fixtures.sql rename to test/io/fixtures/load.sql diff --git a/test/io/replica.sql b/test/io/fixtures/replica.sql similarity index 100% rename from test/io/replica.sql rename to test/io/fixtures/replica.sql