tests: Adding update to project info for negative test case

Signed-off-by: teddylear <teddylear@gmail.com>
This commit is contained in:
teddylear 2022-04-07 17:16:51 -04:00
parent 69ce99d020
commit 7cf8c280af
2 changed files with 7 additions and 1 deletions

View File

@ -28,7 +28,7 @@ var infoCmd = &cobra.Command{
lg.Fatal().Msg("dagger project not found. Run `dagger project init`") lg.Fatal().Msg("dagger project not found. Run `dagger project init`")
} }
fmt.Printf("\nCurrent dagger project in: %s", cueModPath) fmt.Printf("\nCurrent dagger project in: %s\n", cueModPath)
// TODO: find available plans and if they load successfully // TODO: find available plans and if they load successfully
}, },

View File

@ -4,6 +4,7 @@ setup() {
common_setup common_setup
TEMPDIR=$(mktemp -d) TEMPDIR=$(mktemp -d)
TEMPDIR2=$(mktemp -d)
} }
@test "project init and update and info" { @test "project init and update and info" {
@ -32,4 +33,9 @@ setup() {
assert_success assert_success
assert_output --partial "Current dagger project in:" assert_output --partial "Current dagger project in:"
assert_output --partial "$TEMPDIR" assert_output --partial "$TEMPDIR"
cd "$TEMPDIR2" || exit
run "$DAGGER" project info
assert_failure
assert_output --partial "dagger project not found. Run \`dagger project init\`"
} }