agent/consul: forward request if necessary

This commit is contained in:
Mitchell Hashimoto 2018-05-10 22:38:13 -07:00
parent 54ac5adb08
commit 2a29679e9d
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A
1 changed files with 5 additions and 0 deletions

View File

@ -263,6 +263,11 @@ func (s *Intention) Match(
func (s *Intention) Test(
args *structs.IntentionQueryRequest,
reply *structs.IntentionQueryTestResponse) error {
// Forward maybe
if done, err := s.srv.forward("Intention.Test", args, args, reply); done {
return err
}
// Get the test args, and defensively guard against nil
query := args.Test
if query == nil {