node pools: replicate from authoritative region (#17456)

Upserts and deletes of node pools are forwarded to the authoritative region,
just like we do for namespaces, quotas, ACL policies, etc. Replicate node pools
from the authoritative region.
This commit is contained in:
Tim Gross
2023-06-12 13:24:24 -04:00
committed by GitHub
parent ca86582f69
commit 5bb6e5758d
7 changed files with 279 additions and 1 deletions

View File

@@ -73,6 +73,7 @@ func TestHTTP_NodePool_Info(t *testing.T) {
// Verify expected pool is returned.
must.Eq(t, pool, obj.(*structs.NodePool), must.Cmp(cmpopts.IgnoreFields(
structs.NodePool{},
"Hash",
"CreateIndex",
"ModifyIndex",
)))
@@ -143,6 +144,7 @@ func TestHTTP_NodePool_Create(t *testing.T) {
must.NoError(t, err)
must.Eq(t, pool, got, must.Cmp(cmpopts.IgnoreFields(
structs.NodePool{},
"Hash",
"CreateIndex",
"ModifyIndex",
)))
@@ -193,6 +195,7 @@ func TestHTTP_NodePool_Update(t *testing.T) {
must.NoError(t, err)
must.Eq(t, updated, got, must.Cmp(cmpopts.IgnoreFields(
structs.NodePool{},
"Hash",
"CreateIndex",
"ModifyIndex",
)))
@@ -239,6 +242,7 @@ func TestHTTP_NodePool_Update(t *testing.T) {
must.NoError(t, err)
must.Eq(t, updated, got, must.Cmp(cmpopts.IgnoreFields(
structs.NodePool{},
"Hash",
"CreateIndex",
"ModifyIndex",
)))
@@ -278,6 +282,7 @@ func TestHTTP_NodePool_Update(t *testing.T) {
must.NoError(t, err)
must.Eq(t, pool, got, must.Cmp(cmpopts.IgnoreFields(
structs.NodePool{},
"Hash",
"CreateIndex",
"ModifyIndex",
)))