This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
dagger/dagger/input_test.go
Andrea Luzzardi 3bfa056b9b tests: fix input test
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-26 16:24:22 -07:00

23 lines
466 B
Go

package dagger
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestInputDir(t *testing.T) {
st := &RouteState{
LayoutSource: DirInput("/tmp/source", []string{}),
}
require.NoError(t, st.AddInput("www.source", DirInput(".", []string{})))
route, err := NewRoute(st)
require.NoError(t, err)
localdirs := route.LocalDirs()
require.Len(t, localdirs, 2)
require.Contains(t, localdirs, ".")
require.Contains(t, localdirs, "/tmp/source")
}