Only return live workers in ListHcpbWorkersResponse (#2876)

This commit is contained in:
Todd authored and GitHub committed 2023-02-01 10:24:56 -08:00
1 parent a030c15403
commit d8aea569c5
4 files changed
+44 -27

No files matched your search

+2 -1
View File
@@ -21,7 +21,7 @@ func TestTestKmsWorker(t *testing.T) {
description = "test description"
address = "test address"
)
tWorker := TestKmsWorker(t, conn, wrapper, WithName(name), WithDescription(description), WithAddress(address))
tWorker := TestKmsWorker(t, conn, wrapper, WithName(name), WithDescription(description), WithAddress(address), WithOperationalState(ShutdownOperationalState.String()))
assert.NotNil(t, tWorker)
assert.True(t, strings.HasPrefix(tWorker.GetPublicId(), WorkerPrefix))
@@ -35,6 +35,7 @@ func TestTestKmsWorker(t *testing.T) {
assert.Equal(t, name, lkpWorker.GetName())
assert.Equal(t, description, lkpWorker.GetDescription())
assert.Equal(t, address, lkpWorker.GetAddress())
assert.Equal(t, ShutdownOperationalState.String(), lkpWorker.OperationalState)
}
func TestTestPkiWorker(t *testing.T) {