+1
nixos/tests/all-tests.nix
+1
nixos/tests/all-tests.nix
···
+60
nixos/tests/postgresql-wal2json.nix
+60
nixos/tests/postgresql-wal2json.nix
···+"sudo -u postgres psql -qAt -f ${./postgresql/wal2json/example2.sql} postgres > /tmp/example2.out"+"sudo -u postgres psql -qAt -f ${./postgresql/wal2json/example3.sql} postgres > /tmp/example3.out"+# but if postgresql is set, we're being made as a passthru test for a specific postgres + wal2json version, just run one
+27
nixos/tests/postgresql/wal2json/LICENSE
+27
nixos/tests/postgresql/wal2json/LICENSE
···
+11
nixos/tests/postgresql/wal2json/README.md
+11
nixos/tests/postgresql/wal2json/README.md
···+Data in this folder taken from the wal2json README's examples [here](https://github.com/eulerto/wal2json/tree/75629c2e1e81a12350cc9d63782fc53252185d8d#sql-functions)
+74
nixos/tests/postgresql/wal2json/example2.out
+74
nixos/tests/postgresql/wal2json/example2.out
···+"content": "this non-transactional message will be delivered even if you rollback the transaction"
+31
nixos/tests/postgresql/wal2json/example2.sql
+31
nixos/tests/postgresql/wal2json/example2.sql
···+SELECT pg_logical_emit_message(false, 'wal2json', 'this non-transactional message will be delivered even if you rollback the transaction');+SELECT data FROM pg_logical_slot_get_changes('test_slot', NULL, NULL, 'pretty-print', '1', 'add-msg-prefixes', 'wal2json');
+12
nixos/tests/postgresql/wal2json/example3.out
+12
nixos/tests/postgresql/wal2json/example3.out
···+{"action":"M","transactional":false,"prefix":"wal2json","content":"this non-transactional message will be delivered even if you rollback the transaction"}+{"action":"I","schema":"public","table":"table3_with_pk","columns":[{"name":"a","type":"integer","value":1},{"name":"b","type":"character varying(30)","value":"Backup and Restore"},{"name":"c","type":"timestamp without time zone","value":"2019-12-29 04:58:34.806671"}]}+{"action":"I","schema":"public","table":"table3_with_pk","columns":[{"name":"a","type":"integer","value":2},{"name":"b","type":"character varying(30)","value":"Tuning"},{"name":"c","type":"timestamp without time zone","value":"2019-12-29 04:58:34.806671"}]}+{"action":"I","schema":"public","table":"table3_with_pk","columns":[{"name":"a","type":"integer","value":3},{"name":"b","type":"character varying(30)","value":"Replication"},{"name":"c","type":"timestamp without time zone","value":"2019-12-29 04:58:34.806671"}]}+{"action":"M","transactional":true,"prefix":"wal2json","content":"this message will be delivered"}+{"action":"D","schema":"public","table":"table3_with_pk","identity":[{"name":"a","type":"integer","value":1},{"name":"c","type":"timestamp without time zone","value":"2019-12-29 04:58:34.806671"}]}+{"action":"D","schema":"public","table":"table3_with_pk","identity":[{"name":"a","type":"integer","value":2},{"name":"c","type":"timestamp without time zone","value":"2019-12-29 04:58:34.806671"}]}+{"action":"I","schema":"public","table":"table3_without_pk","columns":[{"name":"a","type":"integer","value":1},{"name":"b","type":"numeric(5,2)","value":2.34},{"name":"c","type":"text","value":"Tapir"}]}
+26
nixos/tests/postgresql/wal2json/example3.sql
+26
nixos/tests/postgresql/wal2json/example3.sql
···+SELECT pg_logical_emit_message(false, 'wal2json', 'this non-transactional message will be delivered even if you rollback the transaction');+SELECT data FROM pg_logical_slot_get_changes('test_slot', NULL, NULL, 'format-version', '2', 'add-msg-prefixes', 'wal2json');
+6
-1
pkgs/servers/sql/postgresql/ext/wal2json.nix
+6
-1
pkgs/servers/sql/postgresql/ext/wal2json.nix
······+passthru.tests.wal2json = lib.recurseIntoAttrs (callPackage ../../../../../nixos/tests/postgresql-wal2json.nix {