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:
GnomeZworc 2026-10-25 23:36:14 +01:00
commit 26095062c8
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632
10 changed files with 200 additions and 3 deletions

View file

@ -74,6 +74,13 @@ func TestNew_IntervalleValideConserve(t *testing.T) {
}
}
func TestNew_ChecksThePublicSegmentOnTheSystem(t *testing.T) {
w := New(newTestDB(t), testCfg(t), &recorder{}, nil, time.Second)
if _, ok := w.public.(systemPublicProbe); !ok {
t.Errorf("sonde du segment public = %T, systemPublicProbe attendue", w.public)
}
}
func TestNew_LoggerNil(t *testing.T) {
w := New(newTestDB(t), testCfg(t), &recorder{}, nil, time.Second)
if w.logger == nil {
@ -141,6 +148,7 @@ func TestRun_ErreurDeBaseLogueeEtBoucleContinue(t *testing.T) {
n := newChanNotifier()
l, buf := testLogger()
w := New(db, testCfg(t), n, l, 10*time.Millisecond)
w.public = &fakePublicProbe{ports: []string{"vxlan-public"}}
ctx, cancel := context.WithTimeout(context.Background(), 300*time.Millisecond)
defer cancel()