From 89fc98322eed4959891533799e9451ea366beaed Mon Sep 17 00:00:00 2001 From: "R.B. Boyer" Date: Fri, 5 Jun 2020 03:41:39 -0500 Subject: [PATCH] tests: ensure that the ServiceExists helper function normalizes entmeta (#8025) This fixes a unit test failure over in enterprise due to https://github.com/hashicorp/consul/pull/7384 --- agent/local/state.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/agent/local/state.go b/agent/local/state.go index 793cab3f0a..335721a5cf 100644 --- a/agent/local/state.go +++ b/agent/local/state.go @@ -487,6 +487,8 @@ func (l *State) AddAliasCheck(checkID structs.CheckID, srcServiceID structs.Serv // ServiceExists return true if the given service does exists func (l *State) ServiceExists(serviceID structs.ServiceID) bool { + serviceID.EnterpriseMeta.Normalize() + l.Lock() defer l.Unlock() return l.services[serviceID] != nil