nix-super/doc/manual/src/contributing
Valentin Gagarin 33ca905cdb tests: simplify initialisation and wiring
pararameterisation is not actually needed the way things are currently
set up, and it confused me when trying to understand what the code does.

all but one test sources vars-and-functions.sh, which nominally only
defines variables, but in practice is always coupled with the actual
initialisation. while the cleaner way of making this more legible would
be to source variables and initialisation separately, this would produce
a huge diff.

the change requires a few small fixes to keep the tests working:

- only create test home directory during initialisation

  that vars-and-functions.sh wrote to the file system seems not write

- fix creation of the test directory

  due to statefulness, the test home directory was implicitly creating
  the test root, too. decoupling that made it apparent that this was
  probably not intentional, and certainly confusing.

- only source vars-and-functions.sh if init.sh is not needed

  there is one test case that only needs a helper function but no
  initialisation side effects

- remove some unnecessary cleanups and split parts of re-used test code

  there were confusing bits in how initialisation code was repurposed,
  which break if trying to refactor the outer layers naively...
2024-05-13 15:19:49 +02:00
..
cli-guideline.md Merge pull request #9478 from tweag/nix-config-check 2023-12-01 10:19:19 -05:00
cxx.md Split out worker protocol template definitions from declarations 2023-06-19 11:45:59 -04:00
documentation.md doc/manual: Add C API to menu 2024-04-24 20:04:18 +02:00
experimental-features.md Single page for experimental feature descriptions 2023-04-09 11:01:23 -04:00
hacking.md Edit docs 2024-04-21 14:16:46 +02:00
index.md Avoid <name>/<name> in documentation URLs 2023-11-30 09:37:32 -05:00
testing.md tests: simplify initialisation and wiring 2024-05-13 15:19:49 +02:00