acba8b3988
- Remove intermediary types `Component`, `Script`, `Op`, `mount`: just use `cc.Value` directly - Remove `Executable` interface. - Execute llb code with a simple concrete type `Pipeline` - Analyze llb code with a simple utility `Analyze` Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
32 lines
513 B
Go
32 lines
513 B
Go
package dagger
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestEnvInputFlag(t *testing.T) {
|
|
env, err := NewEnv()
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
|
|
input, err := NewInputValue(`{}`)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if err := input.DirFlag().Set("www.source=."); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if err := env.SetInput(input.Value()); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
|
|
localdirs := env.LocalDirs()
|
|
if len(localdirs) != 1 {
|
|
t.Fatal(localdirs)
|
|
}
|
|
if dir, ok := localdirs["."]; !ok || dir != "." {
|
|
t.Fatal(localdirs)
|
|
}
|
|
}
|