From ee77d65f285604eac1a7241e109fa85ac3296725 Mon Sep 17 00:00:00 2001 From: GnomeZworc Date: Mon, 5 Oct 2026 20:55:51 +0200 Subject: [PATCH] =?UTF-8?q?f-50:=20lab:=20sc=C3=A9narios=20et=20topologies?= =?UTF-8?q?=20d=C3=A9plac=C3=A9s=20sous=20test/e2e=20#50?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: GnomeZworc --- cmd/labctl/main_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/labctl/main_test.go b/cmd/labctl/main_test.go index fe17d78..733fd3c 100644 --- a/cmd/labctl/main_test.go +++ b/cmd/labctl/main_test.go @@ -27,7 +27,7 @@ func TestRun_UsageOnMissingArguments(t *testing.T) { } func TestRun_PlanOfTheShippedExampleTopology(t *testing.T) { - code, stdout, stderr := runLab("plan", filepath.Join("..", "..", "conf", "lab", "evpn-2hv.yml")) + code, stdout, stderr := runLab("plan", filepath.Join("..", "..", "test", "e2e", "topologies", "evpn-2hv.yml")) if code != 0 { t.Fatalf("code %d, stderr %s", code, stderr) } @@ -82,7 +82,7 @@ func TestRun_RenderWritesEveryNodeFiles(t *testing.T) { t.Fatal(err) } out := filepath.Join(dir, "run") - code, stdout, stderr := runLab("render", "-key", key, filepath.Join("..", "..", "conf", "lab", "evpn-2hv.yml"), out) + code, stdout, stderr := runLab("render", "-key", key, filepath.Join("..", "..", "test", "e2e", "topologies", "evpn-2hv.yml"), out) if code != 0 { t.Fatalf("code %d, stderr %s", code, stderr) } @@ -118,7 +118,7 @@ func TestRun_RenderWritesEveryNodeFiles(t *testing.T) { } func TestRun_RenderRefusesMissingKeyFile(t *testing.T) { - code, _, stderr := runLab("render", "-key", filepath.Join(t.TempDir(), "absent.pub"), filepath.Join("..", "..", "conf", "lab", "evpn-2hv.yml"), t.TempDir()) + code, _, stderr := runLab("render", "-key", filepath.Join(t.TempDir(), "absent.pub"), filepath.Join("..", "..", "test", "e2e", "topologies", "evpn-2hv.yml"), t.TempDir()) if code != 1 || !strings.Contains(stderr, "absent.pub") { t.Errorf("code %d, stderr %q", code, stderr) } @@ -130,7 +130,7 @@ func savedLab(t *testing.T) string { if err := os.MkdirAll(run, 0o700); err != nil { t.Fatal(err) } - example, err := os.ReadFile(filepath.Join("..", "..", "conf", "lab", "evpn-2hv.yml")) + example, err := os.ReadFile(filepath.Join("..", "..", "test", "e2e", "topologies", "evpn-2hv.yml")) if err != nil { t.Fatal(err) } @@ -308,7 +308,7 @@ func TestRun_RenderShipsTheExampleFRRConfigs(t *testing.T) { t.Fatal(err) } out := filepath.Join(dir, "run") - code, _, stderr := runLab("render", "-key", key, filepath.Join("..", "..", "conf", "lab", "evpn-2hv.yml"), out) + code, _, stderr := runLab("render", "-key", key, filepath.Join("..", "..", "test", "e2e", "topologies", "evpn-2hv.yml"), out) if code != 0 { t.Fatalf("code %d, stderr %s", code, stderr) }