Knocks out the Raft indexes before doing compare.
This commit is contained in:
parent
3f07f0685f
commit
bcdabe4606
|
@ -127,6 +127,7 @@ func TestAgentAntiEntropy_Services(t *testing.T) {
|
||||||
|
|
||||||
// All the services should match
|
// All the services should match
|
||||||
for id, serv := range services.NodeServices.Services {
|
for id, serv := range services.NodeServices.Services {
|
||||||
|
serv.CreateIndex, serv.ModifyIndex = 0, 0
|
||||||
switch id {
|
switch id {
|
||||||
case "mysql":
|
case "mysql":
|
||||||
if !reflect.DeepEqual(serv, srv1) {
|
if !reflect.DeepEqual(serv, srv1) {
|
||||||
|
@ -236,6 +237,7 @@ func TestAgentAntiEntropy_EnableTagOverride(t *testing.T) {
|
||||||
|
|
||||||
// All the services should match
|
// All the services should match
|
||||||
for id, serv := range services.NodeServices.Services {
|
for id, serv := range services.NodeServices.Services {
|
||||||
|
serv.CreateIndex, serv.ModifyIndex = 0, 0
|
||||||
switch id {
|
switch id {
|
||||||
case "svc_id1":
|
case "svc_id1":
|
||||||
if serv.ID != "svc_id1" ||
|
if serv.ID != "svc_id1" ||
|
||||||
|
@ -455,6 +457,7 @@ func TestAgentAntiEntropy_Services_ACLDeny(t *testing.T) {
|
||||||
|
|
||||||
// All the services should match
|
// All the services should match
|
||||||
for id, serv := range services.NodeServices.Services {
|
for id, serv := range services.NodeServices.Services {
|
||||||
|
serv.CreateIndex, serv.ModifyIndex = 0, 0
|
||||||
switch id {
|
switch id {
|
||||||
case "mysql":
|
case "mysql":
|
||||||
t.Fatalf("should not be permitted")
|
t.Fatalf("should not be permitted")
|
||||||
|
@ -581,6 +584,7 @@ func TestAgentAntiEntropy_Checks(t *testing.T) {
|
||||||
|
|
||||||
// All the checks should match
|
// All the checks should match
|
||||||
for _, chk := range checks.HealthChecks {
|
for _, chk := range checks.HealthChecks {
|
||||||
|
chk.CreateIndex, chk.ModifyIndex = 0, 0
|
||||||
switch chk.CheckID {
|
switch chk.CheckID {
|
||||||
case "mysql":
|
case "mysql":
|
||||||
if !reflect.DeepEqual(chk, chk1) {
|
if !reflect.DeepEqual(chk, chk1) {
|
||||||
|
|
Loading…
Reference in a new issue