keep the mirror hint off forge errors, forward the hyperhive mirror from any controller host
This commit is contained in:
parent
a6b5bafa83
commit
52cdfe84a0
1 changed files with 70 additions and 36 deletions
|
|
@ -1410,19 +1410,20 @@ let
|
|||
# forge has none, so the controller seeds a mirror of it: by default,
|
||||
# with another upstream when the option says so, and not at all when it
|
||||
# is null (controllerWithMirrors) or without the controller (forgeOnly).
|
||||
name = "a forge beside the controller mirrors hyperhive/hyperhive unless told not to";
|
||||
# controllerAlone has the forge on another host and still gets the default.
|
||||
name = "the controller mirrors hyperhive/hyperhive on its forge unless told not to";
|
||||
ok =
|
||||
let
|
||||
mirrorsOf =
|
||||
m: builtins.fromJSON m.systemd.services.swarm-controller.environment.SWARM_CONTROLLER_FORGE_MIRRORS;
|
||||
hyperhiveOf = m: lib.filter (e: e.dest == "hyperhive/hyperhive") (mirrorsOf m);
|
||||
in
|
||||
hyperhiveOf forgeWithController == [
|
||||
{
|
||||
defaultHyperhive = {
|
||||
upstream = "https://forge.darkest.space/hyperhive/hyperhive";
|
||||
dest = "hyperhive/hyperhive";
|
||||
}
|
||||
]
|
||||
};
|
||||
in
|
||||
hyperhiveOf forgeWithController == [ defaultHyperhive ]
|
||||
&& hyperhiveOf controllerAlone == [ defaultHyperhive ]
|
||||
&& map (e: e.upstream) (hyperhiveOf controllerWithSelfActions) == [ hyperhiveElsewhere ]
|
||||
&& hyperhiveOf controllerWithMirrors == [ ]
|
||||
&& forgeOnly.services.hyperhive.deploy.forgejo.hyperhiveUpstream == null;
|
||||
|
|
|
|||
Loading…
Reference in a new issue