test: use isPermissionDenied
This commit is contained in:
parent
66c6362a70
commit
9b161bdee3
|
@ -1707,7 +1707,7 @@ func TestAgent_Monitor_ACLDeny(t *testing.T) {
|
||||||
|
|
||||||
// Try without a token.
|
// Try without a token.
|
||||||
req, _ := http.NewRequest("GET", "/v1/agent/monitor", nil)
|
req, _ := http.NewRequest("GET", "/v1/agent/monitor", nil)
|
||||||
if _, err := srv.AgentMonitor(nil, req); err != errPermissionDenied {
|
if _, err := srv.AgentMonitor(nil, req); !isPermissionDenied(err) {
|
||||||
t.Fatalf("err: %v", err)
|
t.Fatalf("err: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue