Lee Hinman 9b18c44b67 Default _cat APIs to verbose
`?v=false` can be used if the headers are not desired.

Resolves #8922

Fixes #8927
2014-12-15 12:51:59 +00:00

81 lines
1.5 KiB
YAML
Executable File

---
"Test cat count help":
- do:
cat.count:
help: true
- match:
$body: |
/^ epoch .+ \n
timestamp .+ \n
count .+ \n $/
---
"Test cat count output":
- do:
cat.count:
v: false
- match:
$body: |
/# epoch timestamp count
^ \d+ \s \d{2}:\d{2}:\d{2} \s 0 \s+ \n $/
- do:
index:
index: index1
type: type1
id: 1
body: { foo: bar }
refresh: true
- do:
cat.count:
v: false
- match:
$body: |
/# epoch timestamp count
^ \d+ \s \d{2}:\d{2}:\d{2} \s 1 \s+ \n $/
- do:
index:
index: index2
type: type2
id: 1
body: { foo: bar }
refresh: true
- do:
cat.count:
h: count
v: false
- match:
$body: |
/# count
^ 2 \s+ \n $/
- do:
cat.count:
index: index1
v: false
- match:
$body: |
/# epoch timestamp count
^ \d+ \s \d{2}:\d{2}:\d{2} \s 1 \s+ \n $/
- do:
cat.count:
index: index2
v: true
- match:
$body: |
/^ epoch \s+ timestamp \s+ count \s+ \n
\d+ \s+ \d{2}:\d{2}:\d{2} \s+ \d+ \s+ \n $/