Skip to content

Commit 640caef

Browse files
committed
fix org API key tests
Signed-off-by: Dmitry Kisler <admin@dkisler.com>
1 parent eeb48fa commit 640caef

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

provider/acc-orgapikey_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func TestAccOrgAPIKeys(t *testing.T) {
2828
t.Fatal(err)
2929
}
3030

31-
wantKeyName := projectNamePrefix + "orgApikey" + uuid.NewString()
31+
wantKeyName := "test" + uuid.NewString()
3232

3333
t.Cleanup(func() {
3434
keys, _ := client.ListOrgApiKeys(orgID)

provider/acc_org_api_key_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"os"
66
"testing"
77

8+
"github.com/google/uuid"
89
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
910
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
1011
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
@@ -47,7 +48,7 @@ func TestRecreateOrgAPIKeyIfNotFound(t *testing.T) {
4748
}
4849

4950
t.Run("shall indicate non empty plan if the API key was deleted outside of terraform", func(t *testing.T) {
50-
keyName := "test"
51+
keyName := "test" + uuid.NewString()
5152
resource.Test(
5253
t, resource.TestCase{
5354
ProviderFactories: map[string]func() (*schema.Provider, error){
@@ -80,7 +81,7 @@ func TestRecreateOrgAPIKeyIfNotFound(t *testing.T) {
8081
})
8182

8283
t.Run("shall destroy even if the API key was deleted outside of terraform,", func(t *testing.T) {
83-
keyName := "test"
84+
keyName := "test" + uuid.NewString()
8485
config := fmt.Sprintf(`resource "neon_org_api_key" "this" {
8586
name = "%s"
8687
org_id = "%s"

0 commit comments

Comments
 (0)