---
"Test timestamp templating matches date-mapping defaults":
  - do:
      cluster.health:
          wait_for_status: green

  - do:
      indices.create:
        index: timetest
        body:
          mappings:
            "properties": { "my_time": {"type": "date", "format": "strict_date_optional_time_nanos"}}

  - do:
      ingest.put_pipeline:
        id: "my_timely_pipeline"
        body:  >
          {
            "description": "_description",
            "processors": [
              {
                "set" : {
                  "field": "my_time",
                  "value": "{{ _ingest.timestamp }}"
                }
              }
            ]
          }
  - match: { acknowledged: true }

  - do:
      index:
        index: timetest
        id: "1"
        pipeline: "my_timely_pipeline"
        body: {}

