mirror of https://github.com/hashicorp/consul
Backport of Fix broken tests. into release/1.17.x (#20133)
* backport of commit 7a91738824
* Fix broken test.
---------
Co-authored-by: Derek Menteer <derek.menteer@hashicorp.com>
pull/20142/head
parent
69a3ea5890
commit
14928687bc
|
@ -141,6 +141,7 @@ func TestConfig_Get(t *testing.T) {
|
||||||
// Set indexes and EnterpriseMeta to expected values for assertions
|
// Set indexes and EnterpriseMeta to expected values for assertions
|
||||||
ce.CreateIndex = 12
|
ce.CreateIndex = 12
|
||||||
ce.ModifyIndex = 13
|
ce.ModifyIndex = 13
|
||||||
|
ce.Hash = 0
|
||||||
ce.EnterpriseMeta = acl.EnterpriseMeta{}
|
ce.EnterpriseMeta = acl.EnterpriseMeta{}
|
||||||
ce.Hash = 0
|
ce.Hash = 0
|
||||||
|
|
||||||
|
@ -451,6 +452,7 @@ func TestConfig_Apply_IngressGateway(t *testing.T) {
|
||||||
// Ignore create and modify indices
|
// Ignore create and modify indices
|
||||||
got.CreateIndex = 0
|
got.CreateIndex = 0
|
||||||
got.ModifyIndex = 0
|
got.ModifyIndex = 0
|
||||||
|
got.Hash = 0
|
||||||
|
|
||||||
expect := &structs.IngressGatewayConfigEntry{
|
expect := &structs.IngressGatewayConfigEntry{
|
||||||
Name: "ingress",
|
Name: "ingress",
|
||||||
|
|
|
@ -552,7 +552,6 @@ func TestIntentionApply_WithoutIDs(t *testing.T) {
|
||||||
RaftIndex: entry.RaftIndex,
|
RaftIndex: entry.RaftIndex,
|
||||||
Hash: entry.GetHash(),
|
Hash: entry.GetHash(),
|
||||||
}
|
}
|
||||||
|
|
||||||
require.Equal(t, expect, entry)
|
require.Equal(t, expect, entry)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -692,7 +691,6 @@ func TestIntentionApply_WithoutIDs(t *testing.T) {
|
||||||
RaftIndex: entry.RaftIndex,
|
RaftIndex: entry.RaftIndex,
|
||||||
Hash: entry.GetHash(),
|
Hash: entry.GetHash(),
|
||||||
}
|
}
|
||||||
|
|
||||||
require.Equal(t, expect, entry)
|
require.Equal(t, expect, entry)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2003,6 +2003,7 @@ func TestDatacenterSupportsIntentionsAsConfigEntries(t *testing.T) {
|
||||||
if err := srv.RPC(context.Background(), "ConfigEntry.Get", &arg, &reply); err != nil {
|
if err := srv.RPC(context.Background(), "ConfigEntry.Get", &arg, &reply); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
reply.Entry.SetHash(0)
|
||||||
return reply.Entry, nil
|
return reply.Entry, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2088,7 +2089,7 @@ func TestDatacenterSupportsIntentionsAsConfigEntries(t *testing.T) {
|
||||||
RaftIndex: got.RaftIndex,
|
RaftIndex: got.RaftIndex,
|
||||||
Hash: got.GetHash(),
|
Hash: got.GetHash(),
|
||||||
}
|
}
|
||||||
|
got.Hash = 0
|
||||||
require.Equal(t, expect, got)
|
require.Equal(t, expect, got)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue