From 0e21144529f401008ddca01aea97116271b9f3b0 Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Thu, 25 Mar 2021 15:46:26 -0700 Subject: [PATCH] tests: fix input tests Signed-off-by: Andrea Luzzardi --- dagger/input_test.go | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/dagger/input_test.go b/dagger/input_test.go index 8702f8c8..c639576e 100644 --- a/dagger/input_test.go +++ b/dagger/input_test.go @@ -6,20 +6,14 @@ import ( "github.com/stretchr/testify/require" ) -func TestEnvInputFlag(t *testing.T) { +func TestInputDir(t *testing.T) { st := &RouteState{} require.NoError(t, st.AddInput("www.source", DirInput(".", []string{}))) - env, err := NewRoute(st) - if err != nil { - t.Fatal(err) - } + route, err := NewRoute(st) + require.NoError(t, err) - localdirs := env.LocalDirs() - if len(localdirs) != 1 { - t.Fatal(localdirs) - } - if dir, ok := localdirs["."]; !ok || dir != "." { - t.Fatal(localdirs) - } + localdirs := route.LocalDirs() + require.Len(t, localdirs, 1) + require.Equal(t, ".", localdirs["."]) }