From c26f162e7573dd1ee1d73be78a40c56f8d0e99dc Mon Sep 17 00:00:00 2001 From: Sauparna Gupta Date: Tue, 25 Jun 2024 14:06:21 +0530 Subject: [PATCH] chore: fixed some false commits --- client/client_pact_test.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/client/client_pact_test.go b/client/client_pact_test.go index ec35a3d..789da40 100644 --- a/client/client_pact_test.go +++ b/client/client_pact_test.go @@ -598,7 +598,7 @@ func TestTerraformClientPact(t *testing.T) { Name: "terraform user", Email: "terraform.user@some.domain", Active: true, - Type: 0, + Type: broker.RegularUser, } created := broker.User{ @@ -813,7 +813,7 @@ 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 { @@ -821,9 +821,7 @@ func TestTerraformClientPact(t *testing.T) { 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 })