From 5759071bd7214619a8d6f14ba1b542ad7ff4fdf1 Mon Sep 17 00:00:00 2001 From: Kenneth Lear Date: Wed, 6 Apr 2022 21:26:38 -0400 Subject: [PATCH] test: Update project info command to pass lint and test to make sure TEMPDIR is there Signed-off-by: Kenneth Lear --- cmd/dagger/cmd/project/info.go | 3 ++- tests/project.bats | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/dagger/cmd/project/info.go b/cmd/dagger/cmd/project/info.go index c536fb5f..7fd1edb6 100644 --- a/cmd/dagger/cmd/project/info.go +++ b/cmd/dagger/cmd/project/info.go @@ -2,6 +2,7 @@ package project import ( "fmt" + "github.com/spf13/cobra" "github.com/spf13/viper" "go.dagger.io/dagger/cmd/dagger/logger" @@ -27,7 +28,7 @@ var infoCmd = &cobra.Command{ lg.Fatal().Msg("dagger project not found. Run `dagger project init`") } - fmt.Println(fmt.Sprintf("Current dagger project in: %s", cueModPath)) + fmt.Printf("\nCurrent dagger project in: %s", cueModPath) // TODO: find available plans and if they load successfully }, diff --git a/tests/project.bats b/tests/project.bats index 50b09787..8df55dcc 100644 --- a/tests/project.bats +++ b/tests/project.bats @@ -31,4 +31,5 @@ setup() { "$DAGGER" project info assert_output --partial "Current dagger project in" + assert_output --partial "$TEMPDIR" }