Implements dagger project init

Signed-off-by: Richard Jones <richard@dagger.io>
This commit is contained in:
Richard Jones
2022-03-03 16:15:36 -07:00
parent a21281d2eb
commit 7bcf9a9402
7 changed files with 75 additions and 26 deletions

16
tests/project.bats Normal file
View File

@@ -0,0 +1,16 @@
setup() {
load 'helpers'
common_setup
}
@test "project init" {
cd "$TESTDIR"
# mkdir -p ./project/init
"$DAGGER" project init ./project/init --name "github.com/foo/bar"
test -d ./project/init/cue.mod/pkg
test -d ./project/init/cue.mod/usr
test -f ./project/init/cue.mod/module.cue
contents=$(cat ./project/init/cue.mod/module.cue)
[ "$contents" == 'module: "github.com/foo/bar"' ]
}