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 GitHub
parent b88bd6660e
commit 9cfa4a3fc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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