From 05a8097c5d5b5bd579798ba5255b496c214ed912 Mon Sep 17 00:00:00 2001 From: Paul Banks Date: Wed, 13 Jun 2018 20:01:05 +0100 Subject: [PATCH] Fix misc test failures (some from other PRs) --- agent/consul/fsm/commands_oss_test.go | 1 + api/connect_ca_test.go | 2 +- api/connect_intention_test.go | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/agent/consul/fsm/commands_oss_test.go b/agent/consul/fsm/commands_oss_test.go index 85b20b4428..9b859f7bfe 100644 --- a/agent/consul/fsm/commands_oss_test.go +++ b/agent/consul/fsm/commands_oss_test.go @@ -1166,6 +1166,7 @@ func TestFSM_Intention_CRUD(t *testing.T) { Intention: structs.TestIntention(t), } ixn.Intention.ID = generateUUID() + ixn.Intention.UpdatePrecedence() { buf, err := structs.Encode(structs.IntentionRequestType, ixn) diff --git a/api/connect_ca_test.go b/api/connect_ca_test.go index 9cfaa9a0ac..6e93ba927a 100644 --- a/api/connect_ca_test.go +++ b/api/connect_ca_test.go @@ -24,7 +24,7 @@ func TestAPI_ConnectCARoots_empty(t *testing.T) { connect := c.Connect() list, meta, err := connect.CARoots(nil) require.NoError(err) - require.Equal(uint64(0), meta.LastIndex) + require.Equal(uint64(1), meta.LastIndex) require.Len(list.Roots, 0) require.Empty(list.TrustDomain) } diff --git a/api/connect_intention_test.go b/api/connect_intention_test.go index 83f86d3ab1..bec1d8ef2b 100644 --- a/api/connect_intention_test.go +++ b/api/connect_intention_test.go @@ -163,6 +163,7 @@ func testIntention() *Intention { SourceName: "api", DestinationNS: "eng", DestinationName: "db", + Precedence: 9, Action: IntentionActionAllow, SourceType: IntentionSourceConsul, Meta: map[string]string{},