Add a basic integration test #323
No reviewers
Labels
No labels
api service
blocked
bug
component: fediversity panel
component: nixops4
documentation
estimation high: >3d
estimation low: <2h
estimation mid: <8h
productisation
project-management
question
role: sysadmin
security
technical debt
testing
type unclear
type: key result
type: objective
type: task
type: user story
user experience
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Blocks
#102 CI rejects failing deployments}
Fediversity/Fediversity
Reference: Fediversity/Fediversity#323
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "Niols/Fediversity:integration-test"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR adds a basic deployment test to the repository. This test will, in a NixOS test, run a deployer VM and a target VM, and check that we manage to run
nixops4 apply
on the deployer VM to change things on the target VM. The ideas are all @roberth's and this test has been extremely heavily inspired by https://github.com/nixops4/nixops4-nixos/blob/main/test/default/nixosTest.nix.The interesting commit is bb605124ceb146e26ce344653df2d6d62ab12354.
Commits 64a015eca28095c7b18556d078b2b1ee8dd80776 and 1f3f8c9f5dde0a6c75bfe555b784addaa9695871 are lock manipulation commits that improve the run time of the test by removing nixpkgs duplication. They will probably clash with #311. The former, we should just have done a while ago. The latter is more debatable and I would rather do without, but it does half the test running time (from 4 to 2 minutes) on my test machine.
The goal of this PR is to serve as basis for future work, namely:
@ -1,13 +1,14 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs.follows = "nixops4/nixpkgs";
i think this fell afoul of #318, breaking the peertube CI test
Yeah, that's also what I thought. I just now force-pushed a version of this PR without that commit, and we can discuss them independently.
1f3f8c9f5d
to8503e45367
8503e45367
to95fa8ab2e6
Service unavailable - amazing. Indeed, code.forgejo.org seems down. Or when you're reminded that decentralisation in open source is not an easy problem.
Edit: it was transient and is already gone.
Add a basic integration testto WIP: Add a basic integration testIn fact, this run was shorter than the one with
nixpkgs.follows = "nixops4/nixpkgs"
, but I think this is mostly due to things being cached on the runner this time around. Either way, looks like CI is happy with this piece of work. I'll add the other ones in subsequent PRs.WIP: Add a basic integration testto Add a basic integration testhm, would it not be better to mark this as WIP while as per the current PR description that is its current status?
Nice, except the slightly weird factoring of nested imports. (Modulo failing tests due to nixpkgs bump -- do we need the bump?)
@ -0,0 +1,3 @@
{
imports = [ ./check/flake-part.nix ];
Why are we doing those two layers of imports?
What about
flake.nix
importingdeployment/flake-part.nix
, and this one importing all the checks directly? Or would you even ratherflake.nix
imports all the checks directly?I don't really care, but boilerplate files seem wrong. 💁
Fixed in
59038d2f30
.@kiara the WIP in the PR description talks about follow-up work. This one is self-contained.
95fa8ab2e6
tocc6bff2630
I squashed it because the change is rather self-contained, and the individual commits didn't make all that much sense in isolation
nixops4 apply
#329