OpenSearch/rest-api-spec/test/cat.allocation/10_basic.yaml

236 lines
6.3 KiB
YAML
Raw Normal View History

---
"Help":
- do:
cat.allocation:
help: true
v: false
- match:
$body: |
/^ shards .+ \n
disk.used .+ \n
disk.avail .+ \n
disk.total .+ \n
disk.percent .+ \n
host .+ \n
ip .+ \n
node .+ \n
$/
---
"Empty cluster":
- do:
cat.allocation:
v: false
- match:
$body: |
/^
( 0 \s+
\d+(\.\d+)?[kmgt]?b \s+
(\d+(\.\d+)?[kmgt]b \s+)? #no value from client nodes
(\d+(\.\d+)?[kmgt]b \s+)? #no value from client nodes
(\d+ \s+)? #no value from client nodes
[-\w.]+ \s+
\d+(\.\d+){3} \s+
\w.*
2014-02-07 12:22:07 -05:00
\n
)+
$/
---
"One index":
- do:
indices.create:
index: test
- do:
cluster.health:
wait_for_status: green
timeout: 1s
- do:
cat.allocation:
v: false
- match:
$body: |
/^
( \s* #allow leading spaces to account for right-justified text
\d+ \s+
\d+(\.\d+)?[kmgt]?b \s+
(\d+(\.\d+)?[kmgt]b \s+) #always should return value since we filter out non data nodes by default
(\d+(\.\d+)?[kmgt]b \s+) #always should return value since we filter out non data nodes by default
(\d+ \s+) #always should return value since we filter out non data nodes by default
[-\w.]+ \s+
\d+(\.\d+){3} \s+
\w.*
2014-02-07 12:22:07 -05:00
\n
)+
(
\s* #allow leading spaces to account for right-justified text
\d+ \s+
UNASSIGNED \s+
\n
)?
$/
---
"Node ID":
- do:
cat.allocation:
node_id: _master
v: false
- match:
$body: |
/^
( 0 \s+
\d+(\.\d+)?[kmgt]?b \s+
(\d+(\.\d+)?[kmgt]b \s+)? #no value from client nodes
(\d+(\.\d+)?[kmgt]b \s+)? #no value from client nodes
(\d+ \s+)? #no value from client nodes
[-\w.]+ \s+
\d+(\.\d+){3} \s+
\w.*
2014-02-07 12:22:07 -05:00
\n
)
$/
- do:
cat.allocation:
node_id: non_existent
v: false
- match:
$body: |
/^
$/
---
"All Nodes":
- do:
cat.allocation:
node_id: "*"
v: false
- match:
$body: |
/^
( \s* #allow leading spaces to account for right-justified text
\d+ \s+
\d+(\.\d+)?[kmgt]?b \s+
(\d+(\.\d+)?[kmgt]b \s+)? #no value from client nodes
(\d+(\.\d+)?[kmgt]b \s+)? #no value from client nodes
(\d+ \s+)? #no value from client nodes
[-\w.]+ \s+
\d+(\.\d+){3} \s+
\w.*
\n
)+
(
\s* #allow leading spaces to account for right-justified text
\d+ \s+
UNASSIGNED \s+
\n
)?
$/
---
"Column headers":
- do:
cat.allocation:
v: true
- match:
$body: |
/^ shards \s+
disk.used \s+
disk.avail \s+
disk.total \s+
disk.percent \s+
host \s+
ip \s+
node \s+
\n
( \s* #allow leading spaces to account for right-justified text
0 \s+
\d+(\.\d+)?[kmgt]?b \s+
(\d+(\.\d+)?[kmgt]b \s+) #always should return value since we filter out non data nodes by default
(\d+(\.\d+)?[kmgt]b \s+) #always should return value since we filter out non data nodes by default
(\d+ \s+) #always should return value since we filter out non data nodes by default
[-\w.]+ \s+
\d+(\.\d+){3} \s+
\w.*
2014-02-07 12:22:07 -05:00
\n
)+
$/
---
"Select columns":
- do:
cat.allocation:
h: [disk.percent, node]
v: false
- match:
$body: |
/^
( \d* \s+
\w.*
2014-02-07 12:22:07 -05:00
\n
)+
$/
- do:
cat.allocation:
h: [disk.percent, node]
v: true
- match:
$body: |
/^
disk.percent \s+
node \s+
\n
(
\s+\d* \s+
\w.*
2014-02-07 12:22:07 -05:00
\n
)+
$/
---
"Bytes":
- do:
cat.allocation:
bytes: g
v: false
- match:
$body: |
/^
( 0 \s+
\d+ \s+
(\d+ \s+) #always should return value since we filter out non data nodes by default
(\d+ \s+) #always should return value since we filter out non data nodes by default
(\d+ \s+) #always should return value since we filter out non data nodes by default
[-\w.]+ \s+
\d+(\.\d+){3} \s+
\w.*
2014-02-07 12:22:07 -05:00
\n
)+
$/