---
"Validate query api":
  - do:
      indices.create:
        index: testing
        body:
          settings:
            number_of_replicas: 0

  - do:
      cluster.health:
        wait_for_status: yellow

  - do:
      indices.validate_query:
        q: query string

  - is_true: valid

  - do:
      indices.validate_query:
        body:
          query:
            invalid_query: {}

  - is_false: valid

