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
|
||||
ce.CreateIndex = 12
|
||||
ce.ModifyIndex = 13
|
||||
ce.Hash = 0
|
||||
ce.EnterpriseMeta = acl.EnterpriseMeta{}
|
||||
ce.Hash = 0
|
||||
|
||||
|
@ -451,6 +452,7 @@ func TestConfig_Apply_IngressGateway(t *testing.T) {
|
|||
// Ignore create and modify indices
|
||||
got.CreateIndex = 0
|
||||
got.ModifyIndex = 0
|
||||
got.Hash = 0
|
||||
|
||||
expect := &structs.IngressGatewayConfigEntry{
|
||||
Name: "ingress",
|
||||
|
|
|
@ -552,7 +552,6 @@ func TestIntentionApply_WithoutIDs(t *testing.T) {
|
|||
RaftIndex: entry.RaftIndex,
|
||||
Hash: entry.GetHash(),
|
||||
}
|
||||
|
||||
require.Equal(t, expect, entry)
|
||||
}
|
||||
|
||||
|
@ -692,7 +691,6 @@ func TestIntentionApply_WithoutIDs(t *testing.T) {
|
|||
RaftIndex: entry.RaftIndex,
|
||||
Hash: entry.GetHash(),
|
||||
}
|
||||
|
||||
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 {
|
||||
return nil, err
|
||||
}
|
||||
reply.Entry.SetHash(0)
|
||||
return reply.Entry, nil
|
||||
}
|
||||
|
||||
|
@ -2088,7 +2089,7 @@ func TestDatacenterSupportsIntentionsAsConfigEntries(t *testing.T) {
|
|||
RaftIndex: got.RaftIndex,
|
||||
Hash: got.GetHash(),
|
||||
}
|
||||
|
||||
got.Hash = 0
|
||||
require.Equal(t, expect, got)
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue