pulumi/tests/login_test.go
svangordon-fruit 3a276bdd5e
Don't return an error if DeleteAllAccounts failed because the creds file doesn't exist (#6741)
Co-authored-by: Paul Stack <public@paulstack.co.uk>
2021-04-11 14:49:42 +01:00

22 lines
499 B
Go

package tests
import (
"github.com/pulumi/pulumi/pkg/v2/testing/integration"
ptesting "github.com/pulumi/pulumi/sdk/v2/go/common/testing"
"testing"
)
func TestLogin(t *testing.T) {
t.Run("RespectsEnvVar", func(t *testing.T) {
e := ptesting.NewEnvironment(t)
defer deleteIfNotFailed(e)
integration.CreateBasicPulumiRepo(e)
// Running pulumi logout --all twice shouldn't result in an error
e.RunCommand("pulumi", "logout", "--all")
e.RunCommand("pulumi", "logout", "--all")
})
}