summary refs log tree commit diff
path: root/nixos/tests/postgresql.nix
diff options
context:
space:
mode:
authorRodney Lorrimar <dev@rodney.id.au>2017-07-15 14:58:17 +0100
committerRodney Lorrimar <dev@rodney.id.au>2017-07-15 14:58:17 +0100
commit502a272ee78727712c53d316cacba1b416e37d5e (patch)
tree12e91e7a3b9234d30f1c41ba898cad67827d6aa0 /nixos/tests/postgresql.nix
parent39ef4d2fe9ac549af31b24dab75ac08fab255f5c (diff)
downloadnixpkgs-502a272ee78727712c53d316cacba1b416e37d5e.tar
nixpkgs-502a272ee78727712c53d316cacba1b416e37d5e.tar.gz
nixpkgs-502a272ee78727712c53d316cacba1b416e37d5e.tar.bz2
nixpkgs-502a272ee78727712c53d316cacba1b416e37d5e.tar.lz
nixpkgs-502a272ee78727712c53d316cacba1b416e37d5e.tar.xz
nixpkgs-502a272ee78727712c53d316cacba1b416e37d5e.tar.zst
nixpkgs-502a272ee78727712c53d316cacba1b416e37d5e.zip
postgresql: enable XML functions
I suspect these functions aren't widely used, but they are enabled in
PostgreSQL on Ubuntu and Arch.
Diffstat (limited to 'nixos/tests/postgresql.nix')
-rw-r--r--nixos/tests/postgresql.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/nixos/tests/postgresql.nix b/nixos/tests/postgresql.nix
index b5f4e1a4c14..54e7ec9ba17 100644
--- a/nixos/tests/postgresql.nix
+++ b/nixos/tests/postgresql.nix
@@ -13,6 +13,8 @@ let
     INSERT INTO sth (id) VALUES (1);
     INSERT INTO sth (id) VALUES (1);
     INSERT INTO sth (id) VALUES (1);
+    CREATE TABLE xmltest ( doc xml );
+    INSERT INTO xmltest (doc) VALUES ('<test>ok</test>'); -- check if libxml2 enabled
   '';
   make-postgresql-test = postgresql-name: postgresql-package: makeTest {
     name = postgresql-name;
@@ -41,6 +43,7 @@ let
       $machine->fail('test $(psql postgres -tAc "SELECT * FROM sth;"|wc -l) -eq 3');
       $machine->succeed('test $(psql postgres -tAc "SELECT * FROM sth;"|wc -l) -eq 5');
       $machine->fail('test $(psql postgres -tAc "SELECT * FROM sth;"|wc -l) -eq 4');
+      $machine->succeed('test $(psql postgres -tAc "SELECT xpath(\'/test/text()\', doc) FROM xmltest;"|wc -l) -eq 1');
       $machine->shutdown;
     '';