f-41: api, vpc: champ l3vni des VPC #41
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
bf0e83862f
commit
3dd94f35dd
11 changed files with 295 additions and 10 deletions
|
|
@ -16,11 +16,15 @@ import (
|
|||
// The worker queue is buffered but has no running goroutines: Dispatch enqueues
|
||||
// without blocking and Execute never runs, so DB state reflects only Prepare writes.
|
||||
func newTestServer(t *testing.T) (*Server, *badger.DB) {
|
||||
t.Helper()
|
||||
return newTestServerWith(t, &configuration.Config{DefaultInterface: "br-test"})
|
||||
}
|
||||
|
||||
func newTestServerWith(t *testing.T, cfg *configuration.Config) (*Server, *badger.DB) {
|
||||
t.Helper()
|
||||
db := kv.InitDB(kv.Config{Path: t.TempDir()}, false)
|
||||
t.Cleanup(func() { db.Close() })
|
||||
q := worker.New(100)
|
||||
cfg := &configuration.Config{DefaultInterface: "br-test"}
|
||||
logger := slog.New(slog.NewTextHandler(io.Discard, nil))
|
||||
d := dispatcher.New(q, db, cfg, logger)
|
||||
return New(d, db, logger, "127.0.0.1:0"), db
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue