diff options
author | Marko Mušnjak <marko.musnjak@gmail.com> | 2023-05-30 11:39:25 +0200 |
---|---|---|
committer | Marko Mušnjak <marko.musnjak@gmail.com> | 2023-06-02 21:03:19 +0200 |
commit | aafe0f4314ae0dc071463685d8abdaac6d0fad92 (patch) | |
tree | b0f3e5d35547d21e9209533efc1cb8338190881a /nixos/tests/apache_datasketches.nix | |
parent | 32630256f2b17810e859a0a1cb64ba1801958eee (diff) |
apache_datasketches: init at 1.6.0
PostgreSQL extension providing approximate algorithms for distinct item counts, quantile estimation and frequent items detection.
Diffstat (limited to 'nixos/tests/apache_datasketches.nix')
-rw-r--r-- | nixos/tests/apache_datasketches.nix | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/nixos/tests/apache_datasketches.nix b/nixos/tests/apache_datasketches.nix new file mode 100644 index 0000000000000..2bf099ac7991b --- /dev/null +++ b/nixos/tests/apache_datasketches.nix @@ -0,0 +1,29 @@ +import ./make-test-python.nix ({ pkgs, ...} : { + name = "postgis"; + meta = with pkgs.lib.maintainers; { + maintainers = [ lsix ]; # TODO: Who's the maintener now? + }; + + nodes = { + master = + { pkgs, ... }: + + { + services.postgresql = let mypg = pkgs.postgresql_15; in { + enable = true; + package = mypg; + extraPlugins = with mypg.pkgs; [ + apache_datasketches + ]; + }; + }; + }; + + testScript = '' + start_all() + master.wait_for_unit("postgresql") + master.sleep(10) # Hopefully this is long enough!! + master.succeed("sudo -u postgres psql -c 'CREATE EXTENSION datasketches;'") + master.succeed("sudo -u postgres psql -c 'SELECT hll_sketch_to_string(hll_sketch_build(1));'") + ''; +}) |