nomad: fix leftover missed refactoring in consul policy checking

This commit is contained in:
Seth Hoenig 2020-01-15 13:08:10 -06:00
parent 057f117592
commit ee89a754f1
2 changed files with 2 additions and 3 deletions

View File

@ -94,7 +94,7 @@ func (c *consulACLsAPI) policyAllowsServiceWrite(task string, policyID string) (
return false, err
}
if c.allowsServiceWrite(task, cp) {
if cp.allowsServiceWrite(task) {
return true, nil
}

View File

@ -94,8 +94,7 @@ func TestConsulACLsAPI_allowsServiceWrite(t *testing.T) {
t.Parallel()
try := func(t *testing.T, task string, cp *ConsulPolicy, exp bool) {
cAPI := new(consulACLsAPI)
result := cAPI.allowsServiceWrite(task, cp)
result := cp.allowsServiceWrite(task)
require.Equal(t, exp, result)
}