keychain: always ensure the default key is generated
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
@@ -8,12 +8,15 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"go.dagger.io/dagger/keychain"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
func TestWorkspace(t *testing.T) {
|
||||
ctx := context.TODO()
|
||||
|
||||
keychain.EnsureDefaultKey(ctx)
|
||||
|
||||
root, err := os.MkdirTemp(os.TempDir(), "dagger-*")
|
||||
require.NoError(t, err)
|
||||
|
||||
@@ -60,6 +63,8 @@ func TestWorkspace(t *testing.T) {
|
||||
func TestEncryption(t *testing.T) {
|
||||
ctx := context.TODO()
|
||||
|
||||
keychain.EnsureDefaultKey(ctx)
|
||||
|
||||
readManifest := func(st *State) *State {
|
||||
data, err := os.ReadFile(path.Join(st.Path, manifestFile))
|
||||
require.NoError(t, err)
|
||||
|
Reference in New Issue
Block a user