f-55: lab: fichiers des nœuds sur un ISO dédié, envoi des binaires compilés en local #55
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
2cb7c05d88
commit
9f1e8fb10f
9 changed files with 101 additions and 51 deletions
|
|
@ -186,6 +186,10 @@ func TestValidate_ProvisionRejections(t *testing.T) {
|
|||
`hv: { role: host, image: deb, cpus: 1, memory: 512, segments: [red], files: { agent.yml: "" } }`,
|
||||
"node hv: file agent.yml has no source",
|
||||
},
|
||||
"file source with an equals sign": {
|
||||
`hv: { role: host, image: deb, cpus: 1, memory: 512, segments: [red], files: { bin: "a=b" } }`,
|
||||
`node hv: file bin: source "a=b" must not contain '='`,
|
||||
},
|
||||
"service with shell characters": {
|
||||
`hv: { role: host, image: deb, cpus: 1, memory: 512, segments: [red], services: ["agent.service; reboot"] }`,
|
||||
`node hv: service "agent.service; reboot" must match`,
|
||||
|
|
|
|||
|
|
@ -214,6 +214,8 @@ func validateExtras(n Node, segments map[string]Segment, add func(string, ...any
|
|||
add("node %s: file name %q must match %s", n.Name, name, filePattern)
|
||||
case n.Files[name] == "":
|
||||
add("node %s: file %s has no source", n.Name, name)
|
||||
case strings.Contains(n.Files[name], "="):
|
||||
add("node %s: file %s: source %q must not contain '='", n.Name, name, n.Files[name])
|
||||
}
|
||||
}
|
||||
seenUnits := map[string]bool{}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue