Repository navigation
Conversation
The CLI tests used a fake nix script, so they never ran a real flake check. They now run real `nix flake check` on a tiny fixture flake whose check just passes or fails. Commit selection tests moved to unit tests in src/history.rs
| String::from_utf8_lossy(&output.stderr) | ||
| assert_eq!(validated(&output), [first, second]); | ||
| assert_eq!(fixture.repository.head().unwrap().target().unwrap(), head); | ||
| assert_eq!( |
There was a problem hiding this comment.
Checkout test omits index and untracked files
For checkout preservation, the test checks HEAD and flake.nix only; the removed assert_checkout also compared the index bytes and an untracked file.
oak · automated · da3c5e8
There was a problem hiding this comment.
Intentional. The tool only reads Git objects and runs Nix; it never touches the index or the working tree. The HEAD check plus the overwritten flake.nix already show the checkout is left alone, so the index and untracked-file checks didn’t guard anything extra
| @@ -0,0 +1,27 @@ | |||
| { | |||
| outputs = | |||
There was a problem hiding this comment.
Lock-file flag no longer tested
The fixture flake has no inputs, so the new tests never assert --no-update-lock-file or a lock-file update; the removed fake-Nix test asserted it explicitly.
oak · automated · da3c5e8
There was a problem hiding this comment.
Do not think this is necessary . this is will be testing nix not our code
|
ACK da3c5e8
|
Closes #8.
The CLI tests used a fake
nixscript, so they never ran a real flakecheck. Now:
nix flake checkon a tiny fixture flake(
tests/flakes/flake.nix) whose check just passes or fails. Theycheck that each commit's own flake is checked, that the run stops at
the first failure, and that shallow clones work.
src/history.rs