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
Solomon Hykes e6e8ab390d Rename "deployment" to "environment": code
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-04-27 13:59:27 -07:00

23 lines
488 B
Go

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