Fix misc test failures (some from other PRs)

pull/4275/head
Paul Banks 7 years ago committed by Jack Pearkes
parent 382ce8f98a
commit 05a8097c5d

@ -1166,6 +1166,7 @@ func TestFSM_Intention_CRUD(t *testing.T) {
Intention: structs.TestIntention(t), Intention: structs.TestIntention(t),
} }
ixn.Intention.ID = generateUUID() ixn.Intention.ID = generateUUID()
ixn.Intention.UpdatePrecedence()
{ {
buf, err := structs.Encode(structs.IntentionRequestType, ixn) buf, err := structs.Encode(structs.IntentionRequestType, ixn)

@ -24,7 +24,7 @@ func TestAPI_ConnectCARoots_empty(t *testing.T) {
connect := c.Connect() connect := c.Connect()
list, meta, err := connect.CARoots(nil) list, meta, err := connect.CARoots(nil)
require.NoError(err) require.NoError(err)
require.Equal(uint64(0), meta.LastIndex) require.Equal(uint64(1), meta.LastIndex)
require.Len(list.Roots, 0) require.Len(list.Roots, 0)
require.Empty(list.TrustDomain) require.Empty(list.TrustDomain)
} }

@ -163,6 +163,7 @@ func testIntention() *Intention {
SourceName: "api", SourceName: "api",
DestinationNS: "eng", DestinationNS: "eng",
DestinationName: "db", DestinationName: "db",
Precedence: 9,
Action: IntentionActionAllow, Action: IntentionActionAllow,
SourceType: IntentionSourceConsul, SourceType: IntentionSourceConsul,
Meta: map[string]string{}, Meta: map[string]string{},

Loading…
Cancel
Save