Skip to content

Conversation

@jfroche
Copy link
Collaborator

@jfroche jfroche commented Nov 11, 2025

Extract common NixOS test node configuration and functions into lib.nix to eliminate duplication across extension tests.

@jfroche jfroche requested review from a team as code owners November 11, 2025 13:19
@hunleyd
Copy link
Contributor

hunleyd commented Nov 11, 2025

there are three instances of initdb herein, the first with all the options and the 2nd two with no options. and there's two copies of pg_upgrade. would it make sense to consolidate these into lib.nix as well so there's one definition and every use becomes the same @jfroche ?

@jfroche
Copy link
Collaborator Author

jfroche commented Nov 11, 2025

there are three instances of initdb herein, the first with all the options and the 2nd two with no options. and there's two copies of pg_upgrade. would it make sense to consolidate these into lib.nix as well so there's one definition and every use becomes the same @jfroche ?

initdb is called as part of the migration script. That migration script can be different from one extension to another, that's why you can see multiple initdb (and the same for pg_upgrade).

@hunleyd
Copy link
Contributor

hunleyd commented Nov 12, 2025

there are three instances of initdb herein, the first with all the options and the 2nd two with no options. and there's two copies of pg_upgrade. would it make sense to consolidate these into lib.nix as well so there's one definition and every use becomes the same @jfroche ?

initdb is called as part of the migration script. That migration script can be different from one extension to another, that's why you can see multiple initdb (and the same for pg_upgrade).

thanks for explaining; makes sense! will review after conflicts are fixed.

Extract common NixOS test node configuration into common.nix to eliminate
duplication across extension tests.

Tests with custom requirements use lib.mkMerge to override defaults.
This helps us to see at a glance why a test deviates from the standard
setup.
Move `postgresqlWithExtension` and `versions` to the test lib to reduce
code duplication across extension tests.
@jfroche jfroche force-pushed the chore/dry-nixos-tests branch from 625cec1 to a4264ec Compare November 12, 2025 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants