f-87: agent: bridge public = interfaces.internet, watchdog du segment #87
Le veth vp-<id>-e rejoint cfg.PublicBridge() (interfaces.internet, br-public par défaut, jamais default_interface). Le watchdog signale un bridge public absent, éteint ou sans port VXLAN. config.exemple.yml : internet: br-public. Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
7535e068b9
commit
26095062c8
10 changed files with 200 additions and 3 deletions
|
|
@ -145,4 +145,21 @@ func TestLoadConfig_ExempleFourniEstValide(t *testing.T) {
|
|||
if cfg.QEMU.QMPDir == "" {
|
||||
t.Error("config.exemple.yml devrait définir qemu.qmp_dir")
|
||||
}
|
||||
if got := cfg.PublicBridge(); got != "br-public" {
|
||||
t.Errorf("config.exemple.yml : bridge public %q, br-public attendu", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestLoadConfig_PublicBridgeWithoutInternetKey(t *testing.T) {
|
||||
path := filepath.Join(t.TempDir(), "agent.yml")
|
||||
if err := os.WriteFile(path, []byte("default_interface: br-000000\ninterfaces:\n lan: br-lan\n"), 0o600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
cfg, err := LoadConfig(path)
|
||||
if err != nil {
|
||||
t.Fatalf("LoadConfig : %v", err)
|
||||
}
|
||||
if got := cfg.PublicBridge(); got != "br-public" {
|
||||
t.Errorf("bridge public %q, br-public attendu (jamais default_interface)", got)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue