nomad: fix leftover missed refactoring in consul policy checking
This commit is contained in:
parent
057f117592
commit
ee89a754f1
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue