Test that an update keeps upgraded packages
The update test upgrades nixpkgs first; the pin and the lock must survive a rolled-back update, a confirmed one and the rebuild after it. The channel server moves to the shared test helpers. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeFqV9dZrK6nipHkPfyM4F
This commit is contained in:
+1
-21
@@ -63,26 +63,6 @@ let
|
||||
modules = [ "${configDir}/local.nix" ];
|
||||
}).config.system.build.toplevel;
|
||||
|
||||
channelServer = pkgs.writeScript "channels.py" ''
|
||||
#!${pkgs.python3}/bin/python3
|
||||
import http.server
|
||||
|
||||
class Handler(http.server.SimpleHTTPRequestHandler):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, directory="/srv/channels", **kwargs)
|
||||
|
||||
def do_GET(self):
|
||||
parts = self.path.strip("/").split("/")
|
||||
if len(parts) == 2 and parts[1] == "git-revision":
|
||||
self.send_response(302)
|
||||
self.send_header("Location", "/files/" + self.path.strip("/"))
|
||||
self.end_headers()
|
||||
else:
|
||||
super().do_GET()
|
||||
|
||||
http.server.ThreadingHTTPServer(("0.0.0.0", 8080), Handler).serve_forever()
|
||||
'';
|
||||
|
||||
sharedDisk = {
|
||||
virtualisation.diskImage = "./target.qcow2";
|
||||
virtualisation.diskSize = 8192;
|
||||
@@ -121,7 +101,7 @@ pkgs.testers.runNixOSTest {
|
||||
];
|
||||
# channels.nixos.org: <branch>/git-revision is a redirect to the file.
|
||||
networking.firewall.allowedTCPPorts = [ 8080 ];
|
||||
environment.etc."channels.py".source = channelServer;
|
||||
environment.etc."channels.py".source = common.channelServer pkgs;
|
||||
};
|
||||
|
||||
target = {
|
||||
|
||||
Reference in New Issue
Block a user