---
"get task test":
  # Note that this gets much better testing in reindex's tests because it actually saves the task
  - do:
      cluster.state: {}

  - do:
      catch: missing
      tasks.get:
        task_id: foo:1
  - match: {error.reason: "/task.\\[foo:1\\].belongs.to.the.node.\\[foo\\].which.isn't.part.of.the.cluster.and.there.is.no.record.of.the.task/"}

---
"get task test":
  - skip:
      version: " - 5.1.99"
      reason: massage was changed in 5.2.0
  # Note that this gets much better testing in reindex's tests because it actually saves the task
  - do:
      cluster.state: {}

  - do:
      catch: missing
      tasks.get:
        task_id: foo:1
  - match: {error.reason: "/task.\\[foo:1\\].belongs.to.the.node.\\[foo\\].which.isn't.part.of.the.cluster.and.there.is.no.record.of.the.task/"}

Fix test for changed message
Fix test for changed message

Message is only changed in 5.2.0 so we shouldn't assert on it
if we're running with any nodes less than that version.
