From 00ecd53a5628e4935fb34e74134bbe5cb316667d Mon Sep 17 00:00:00 2001 From: Rajat Bajaj Date: Fri, 2 Aug 2024 19:10:47 +0530 Subject: [PATCH] Removed a positive case --- internal/cli/login_test.go | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/internal/cli/login_test.go b/internal/cli/login_test.go index 8b93ab99d..fbae2c24b 100644 --- a/internal/cli/login_test.go +++ b/internal/cli/login_test.go @@ -1,12 +1,8 @@ package cli import ( - "bytes" - "os" "testing" - "github.com/auth0/auth0-cli/internal/display" - "github.com/stretchr/testify/assert" ) @@ -56,26 +52,4 @@ func TestLoginCommand(t *testing.T) { err := cmd.Execute() assert.EqualError(t, err, "flags client-id, client-secret and domain are required together") }) - - t.Run("Positive Test: All three params are passed and Machine Flow is executed", func(t *testing.T) { - message := &bytes.Buffer{} - result := &bytes.Buffer{} - cli := &cli{ - renderer: &display.Renderer{ - MessageWriter: message, - ResultWriter: result, - }, - noInput: true, - } - - domain := os.Getenv("AUTH0_DOMAIN") - clientID := os.Getenv("AUTH0_CLIENT_ID") - clientSecret := os.Getenv("AUTH0_CLIENT_SECRET") - - cmd := loginCmd(cli) - cmd.SetArgs([]string{"--client-id", clientID, "--client-secret", clientSecret, "--domain", domain}) - err := cmd.Execute() - assert.NoError(t, err) - assert.Contains(t, message.String(), "Successfully logged in.") - }) }