1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-19 10:50:24 -04:00
nix/tests/functional/local-overlay-store
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
..
add-lower-inner.sh local-overlay store tests: storeDirs -> setupStoreDirs 2023-12-11 13:30:40 -05:00
add-lower.sh tests: simplify initialisation and wiring 2024-05-13 15:19:49 +02:00
bad-uris.sh tests: simplify initialisation and wiring 2024-05-13 15:19:49 +02:00
build-inner.sh local-overlay store tests: storeDirs -> setupStoreDirs 2023-12-11 13:30:40 -05:00
build.sh tests: simplify initialisation and wiring 2024-05-13 15:19:49 +02:00
check-post-init-inner.sh Fix tests after last rename (path -> pathInLowerStore) 2023-12-11 13:48:42 -05:00
check-post-init.sh tests: simplify initialisation and wiring 2024-05-13 15:19:49 +02:00
common.sh tests: simplify initialisation and wiring 2024-05-13 15:19:49 +02:00
delete-duplicate-inner.sh local-overlay store tests: storeDirs -> setupStoreDirs 2023-12-11 13:30:40 -05:00
delete-duplicate.sh tests: simplify initialisation and wiring 2024-05-13 15:19:49 +02:00
delete-refs-inner.sh Activate hermetic.nix variation only for new layered store tests 2024-02-29 10:06:53 -05:00
delete-refs.sh tests: simplify initialisation and wiring 2024-05-13 15:19:49 +02:00
gc-inner.sh local-overlay store tests: storeDirs -> setupStoreDirs 2023-12-11 13:30:40 -05:00
gc.sh tests: simplify initialisation and wiring 2024-05-13 15:19:49 +02:00
local.mk
optimise-inner.sh local-overlay store tests: storeDirs -> setupStoreDirs 2023-12-11 13:30:40 -05:00
optimise.sh tests: simplify initialisation and wiring 2024-05-13 15:19:49 +02:00
redundant-add-inner.sh Fix tests after last rename (path -> pathInLowerStore) 2023-12-11 13:48:42 -05:00
redundant-add.sh tests: simplify initialisation and wiring 2024-05-13 15:19:49 +02:00
remount.sh
stale-file-handle-inner.sh local-overlay store tests: storeDirs -> setupStoreDirs 2023-12-11 13:30:40 -05:00
stale-file-handle.sh tests: simplify initialisation and wiring 2024-05-13 15:19:49 +02:00
verify-inner.sh tests: Use cp -ar instead of tar-untar pipe 2023-12-11 13:56:18 -05:00
verify.sh tests: simplify initialisation and wiring 2024-05-13 15:19:49 +02:00