Clean up some dev config kms code (#2321)
* Clean up some dev config kms code Although it didn't matter in the combined state, the KMS for auth storage was not actually being set properly if only a worker was being instantiated.
This commit is contained in:
1 parent
661d6a551e
commit
090b2b28f8
5 files changed
+44
-36
No files matched your search
@@ -85,7 +85,7 @@ func TestRotationTicking(t *testing.T) {
|
||||
require.NoError(err)
|
||||
assert.Len(auths, 1)
|
||||
// Fetch creds and store current key
|
||||
currNodeCreds, err := types.LoadNodeCredentials(w.Context(), w.Worker().WorkerAuthStorage, nodeenrollment.CurrentId)
|
||||
currNodeCreds, err := types.LoadNodeCredentials(w.Context(), w.Worker().WorkerAuthStorage, nodeenrollment.CurrentId, nodeenrollment.WithWrapper(w.Config().WorkerAuthStorageKms))
|
||||
require.NoError(err)
|
||||
currKey := currNodeCreds.CertificatePublicKeyPkix
|
||||
|
||||
@@ -101,7 +101,7 @@ func TestRotationTicking(t *testing.T) {
|
||||
assert.Len(auths, i)
|
||||
|
||||
// Fetch creds and compare current key
|
||||
currNodeCreds, err := types.LoadNodeCredentials(w.Context(), w.Worker().WorkerAuthStorage, nodeenrollment.CurrentId)
|
||||
currNodeCreds, err := types.LoadNodeCredentials(w.Context(), w.Worker().WorkerAuthStorage, nodeenrollment.CurrentId, nodeenrollment.WithWrapper(w.Config().WorkerAuthStorageKms))
|
||||
require.NoError(err)
|
||||
assert.NotEqual(currKey, currNodeCreds.CertificatePublicKeyPkix)
|
||||
currKey = currNodeCreds.CertificatePublicKeyPkix
|
||||
|
||||
Reference in new issue
Block a user