Fix broken tests.

This fixes some tests that were broken, but not caught, due to the CICD
pipeline only running a subset of the overall tests on PRs.
pull/20130/head
Derek Menteer 2024-01-09 13:09:22 -06:00
parent 69f775da9a
commit 7a91738824
3 changed files with 5 additions and 3 deletions

View File

@ -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{}
out, err := a.srv.marshalJSON(req, obj)
@ -450,6 +451,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",

View File

@ -551,7 +551,7 @@ func TestIntentionApply_WithoutIDs(t *testing.T) {
},
RaftIndex: entry.RaftIndex,
}
entry.Hash = 0
require.Equal(t, expect, entry)
}
@ -690,7 +690,7 @@ func TestIntentionApply_WithoutIDs(t *testing.T) {
},
RaftIndex: entry.RaftIndex,
}
entry.Hash = 0
require.Equal(t, expect, entry)
}

View File

@ -1281,7 +1281,7 @@ func TestDatacenterSupportsIntentionsAsConfigEntries(t *testing.T) {
RaftIndex: got.RaftIndex,
}
got.Hash = 0
require.Equal(t, expect, got)
})