@@ -5,13 +5,13 @@ There are basically two types of tests you can add:
55- Migration tests.
66
77In all cases, a number of extensions may be installed into the database for
8- use; you can see those in both [ postgresql.conf.in ] ( ../ tests/postgresql.conf.in)
9- and [ prime.sql ] ( ../ tests/prime.sql) (extensions may be enabled in either place.)
8+ use; you can see those in both ` /nix/ tests/postgresql.conf.in`
9+ and ` /nix/ tests/prime.sql` (extensions may be enabled in either place.)
1010
1111## pg\_ regress tests
1212
13- pg\_ regress tests are in [ tests/sql ] ( ./../ tests/sql/) with output in [ tests/expected ] ( ./../ tests/expected/) .
14- To create a new test, create a new SQL file in [ tests/sql ] ( ./../ tests/sql/)
13+ pg\_ regress tests are in ` /nix/ tests/sql/` with output in ` /nix/ tests/expected/` .
14+ To create a new test, create a new SQL file in ` /nix/ tests/sql/` .
1515
1616Next, for each current major version of postgres, we run a "flake check" build one at a time.
1717
@@ -29,8 +29,8 @@ Next, review the logs to identify where the test output was written
2929
3030```
3131postgres> CREATE EXTENSION IF NOT EXISTS index_advisor;
32- postgres> CREATE EXTENSION
33- postgres> (using postmaster on localhost, port 5432)
32+ postgres> CREATE EXTENSION
33+ postgres> (using postmaster on localhost, port 5432)
3434postgres> ============== running regression test queries ==============
3535postgres> test new_test ... diff: /nix/store/5gk419ddz7mzzwhc9j6yj5i8lkw67pdl-tests/expected/new_test.out: No such file or directory
3636postgres> diff command failed with status 512: diff "/nix/store/5gk419ddz7mzzwhc9j6yj5i8lkw67pdl-tests/expected/new_test.out" "/nix/store/2fbrvnnr7iz6yigyf0rb0vxnyqvrgxzp-postgres-15.6-check-harness/regression_output/results/new_test.out" > "/nix/store/2fbrvnnr7iz6yigyf0rb0vxnyqvrgxzp-postgres-15.6-check-harness/regression_output/results/new_test.out.diff
@@ -44,15 +44,15 @@ cp -r /nix/store/2fbrvnnr7iz6yigyf0rb0vxnyqvrgxzp-postgres-15.6-check-harness/re
4444
4545Then you can review the contents of ` regression_output/results/new_test.out ` to see if it matches what you expected.
4646
47- If it does match your expectations, copy the file to [ tests/expected ] ( ./../ tests/expected/) and the test will pass on the next run.
47+ If it does match your expectations, copy the file to ` /nix/ tests/expected/` and the test will pass on the next run.
4848
4949If the output does not match your expectations, update the ` <new_test>.sql ` file, re-run with ` nix flake check -L ` and try again
5050
5151
5252## pgTAP tests
5353
5454These are super easy: simply add ` .sql ` files to the
55- [ tests/smoke ] ( ./../ tests/smoke/) directory, then:
55+ ` /nix/ tests/smoke/` directory, then:
5656
5757```
5858nix flake check -L
@@ -100,7 +100,7 @@ extension authors), step 3 isn't guaranteed, so that's what the whole idea is
100100designed to test.
101101
102102To add data into the database, modify the
103- [ data.sql ] ( .. /nix/tests/migrations/data.sql) script and add whatever you want into
103+ ` /nix/tests/migrations/data.sql ` script and add whatever you want into
104104it. This script gets loaded into the old version of the database at startup, and
105105it's expected that the new version of the database can handle it.
106106
0 commit comments