use prior and current worker auth keys (#2495)

* use prior and current worker auth keys
This commit is contained in:
Irena Rindos authored and irenarindos committed 2022-09-26 11:23:08 -04:00
1 parent 902ca3cccb
commit 4493dfd527
12 files changed
+392 -71

No files matched your search

@@ -212,6 +212,11 @@ func TestStoreWorkerAuth(t *testing.T) {
assert.Equal(nodeInfo.CertificatePublicKeyPkix, nodeLookup.CertificatePublicKeyPkix)
assert.Equal(nodeInfo.State.AsMap(), nodeLookup.State.AsMap())
// Validate that we can find the workerAuth set and key identifier
workerAuthSet, err := storage.FindWorkerAuthByWorkerId(ctx, worker.PublicId)
assert.NoError(err)
assert.Equal(workerAuthSet.Current.WorkerKeyIdentifier, keyId)
// Remove node
err = storage.Remove(ctx, nodeLookup)
require.NoError(err)