Skip to content

Commit

Permalink
feat(svc-account-playbook): Fixes test due to service-account auth ch…
Browse files Browse the repository at this point in the history
…anges

Closes VC-32061
  • Loading branch information
rvelaVenafi committed Mar 27, 2024
1 parent b24a4ab commit 10f9b23
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/vcert/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ func TestGetCredFlagsNoUrl(t *testing.T) {
func TestValidateFlagsForTPPMissingData(t *testing.T) {

flags = commandFlags{}

flags.url = "https://localhost/vedsdk"
flags.userName = ""

Expand All @@ -274,19 +273,19 @@ func TestValidateFlagsForTPPMissingData(t *testing.T) {
t.Fatalf("Error was not expected to be nil. Username and password are required for enrollment")
}

flags = commandFlags{}
flags.url = "https://localhost/vedsdk"
flags.userName = "admin"
flags.password = "xxxx"
flags.noPrompt = true
flags.zone = "Test Policy"

flags = commandFlags{}

err = validateEnrollFlags(commandEnrollName)
if err == nil {
t.Fatalf("Error was not expected to be nil. CN is required for enrollment")
}

flags = commandFlags{}
flags.url = "https://localhost/vedsdk"
flags.userName = "admin"
flags.noPrompt = true
Expand All @@ -299,7 +298,6 @@ func TestValidateFlagsForTPPMissingData(t *testing.T) {
}

flags = commandFlags{}

flags.url = "https://localhost/vedsdk"
flags.userName = "admin"
flags.password = "secret"
Expand All @@ -313,10 +311,12 @@ func TestValidateFlagsForTPPMissingData(t *testing.T) {
t.Fatalf("Error was not expected to be nil. Zone is required for enrollment")
}

flags = commandFlags{}
flags.url = "https://localhost/vedsdk"
flags.token = "udd3OCDO/Vu3An01KSlLzQ=="
flags.commonName = "test"
flags.zone = "Test Policy"
flags.noPrompt = true

err = validateEnrollFlags(commandEnrollName)
if err != nil {
Expand Down

0 comments on commit 10f9b23

Please sign in to comment.