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
This commit is contained in:
R.B. Boyer 2020-06-05 03:41:39 -05:00 committed by hashicorp-ci
parent 0491a9301b
commit 89fc98322e
1 changed files with 2 additions and 0 deletions

View File

@ -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