Skip to content

Commit

Permalink
Replace prefix generation using tempdir with uuid
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Weiße <[email protected]>
  • Loading branch information
daniel-weisse committed Dec 9, 2024
1 parent d3e41c9 commit 727eeb0
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions cli/internal/pkcs11/pkcs11_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build integration && pkcs11
//++ //go:build integration && pkcs11

/*
Copyright (c) Edgeless Systems GmbH
Expand All @@ -19,6 +19,7 @@ import (

"github.com/ThalesGroup/crypto11"
"github.com/edgelesssys/marblerun/util"
"github.com/google/uuid"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand All @@ -39,7 +40,7 @@ func TestLoadX509KeyPair(t *testing.T) {
init: func(t *testing.T) (keyID, keyLabel, certID, certLabel string) {
t.Helper()
require := require.New(t)
prefix := t.TempDir()
prefix := uuid.New().String()
keyID, keyLabel, certID, certLabel = prefix+"keyID", prefix+"keyLabel", prefix+"certID", prefix+"certLabel"
pkcs11, err := crypto11.ConfigureFromFile(*configPath)
require.NoError(err)
Expand All @@ -56,7 +57,7 @@ func TestLoadX509KeyPair(t *testing.T) {
init: func(t *testing.T) (keyID, keyLabel, certID, certLabel string) {
t.Helper()
require := require.New(t)
prefix := t.TempDir()
prefix := uuid.New().String()
keyID, keyLabel, certID, certLabel = prefix+"keyID", prefix+"keyLabel", prefix+"certID", prefix+"certLabel"
pkcs11, err := crypto11.ConfigureFromFile(*configPath)
require.NoError(err)
Expand All @@ -73,7 +74,7 @@ func TestLoadX509KeyPair(t *testing.T) {
init: func(t *testing.T) (keyID, keyLabel, certID, certLabel string) {
t.Helper()
require := require.New(t)
prefix := t.TempDir()
prefix := uuid.New().String()
keyID, keyLabel, certID, certLabel = prefix+"keyID", prefix+"keyLabel", prefix+"certID", prefix+"certLabel"
pkcs11, err := crypto11.ConfigureFromFile(*configPath)
require.NoError(err)
Expand All @@ -90,7 +91,7 @@ func TestLoadX509KeyPair(t *testing.T) {
init: func(t *testing.T) (keyID, keyLabel, certID, certLabel string) {
t.Helper()
require := require.New(t)
prefix := t.TempDir()
prefix := uuid.New().String()
keyID, keyLabel, certID, certLabel = prefix+"keyID", prefix+"keyLabel", prefix+"certID", prefix+"certLabel"
pkcs11, err := crypto11.ConfigureFromFile(*configPath)
require.NoError(err)
Expand All @@ -108,7 +109,7 @@ func TestLoadX509KeyPair(t *testing.T) {
init: func(t *testing.T) (keyID, keyLabel, certID, certLabel string) {
t.Helper()
require := require.New(t)
prefix := t.TempDir()
prefix := uuid.New().String()
keyID, keyLabel, certID, certLabel = prefix+"keyID", prefix+"keyLabel", prefix+"certID", prefix+"certLabel"
pkcs11, err := crypto11.ConfigureFromFile(*configPath)
require.NoError(err)
Expand Down

0 comments on commit 727eeb0

Please sign in to comment.