Skip to content

Commit

Permalink
chore: fixed some false commits
Browse files Browse the repository at this point in the history
  • Loading branch information
Saup21 committed Jun 25, 2024
1 parent b757bee commit c26f162
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions client/client_pact_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ func TestTerraformClientPact(t *testing.T) {
Name: "terraform user",
Email: "[email protected]",
Active: true,
Type: 0,
Type: broker.RegularUser,
}

created := broker.User{
Expand Down Expand Up @@ -813,17 +813,15 @@ func TestTerraformClientPact(t *testing.T) {
}).
WillRespondWith(201, func(b *consumer.V2ResponseBuilder) {
b.Header("Content-Type", S("application/hal+json;charset=utf-8"))
b.Header("Location", Regex("https://foo.com/admin/system-accounts/47b267ba-6163-40f5-833c-112caea52735", `https?://(?:localhost:9292|[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})/admin/system-accounts/[a-f0-9\-]+`))
b.Header("Location", Regex("https://foo.com/admin/system-accounts/71a5be7d-bb9c-427b-ba49-ee8f1df0ae58", `https?://(?:localhost:9292|[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})/admin/system-accounts/[a-f0-9\-]+`))
})

err = mockProvider.ExecuteTest(t, func(config consumer.MockServerConfig) error {
client := clientForPact(config)

res, e := client.CreateSystemAccount(user)
assert.NoError(t, e)
if len(res.UUID) <= 0 {
t.Errorf("expected UUID to exists")
}
assert.Equal(t, created.UUID, res.UUID)

return e
})
Expand Down

0 comments on commit c26f162

Please sign in to comment.