Alexander Reelsen 38639074b4 Testing: Ensure cat API REST tests are unaffected by randomization
The wildcard cat API REST tests relied on bulk.max and bulk.min in
the thread_pool response. However due to the thread pool types being
randomized in InternalTestCluster, the min/max values were not guaranteed
to exist (the cached thread pool type is unbounded and thus does not have a
max value).

In order to prevent this, the test has been removed and now the cat
nodes test is used for wildcard testing, which always returns stats
about the heap.
2015-05-28 16:24:41 +02:00

52 lines
1.8 KiB
YAML
Executable File

---
"Test cat nodes output":
- do:
cat.nodes:
v: false
- match:
$body: |
/ #host ip heap.percent ram.percent load node.role master name
^ (\S+ \s+ (\d{1,3}\.){3}\d{1,3} \s+ \d+ \s+ \d* \s+ \d*(\.\d+)? \s+ [-dc] \s+ [-*mx] \s+ (\S+\s?)+ \s+ \n)+ $/
- do:
cat.nodes:
v: true
- match:
$body: |
/^ host \s+ ip \s+ heap\.percent \s+ ram\.percent \s+ load \s+ node\.role \s+ master \s+ name \s+ \n
(\S+ \s+ (\d{1,3}\.){3}\d{1,3} \s+ \d+ \s+ \d* \s+ \d*(\.\d+)? \s+ [-dc] \s+ [-*mx] \s+ (\S+\s?)+ \s+ \n)+ $/
- do:
cat.nodes:
h: heap.current,heap.percent,heap.max
v: true
- match:
$body: |
/^ heap\.current \s+ heap\.percent \s+ heap\.max \s+ \n
(\s+ \d+(\.\d+)?[ptgmk]?b \s+ \d+ \s+ \d+(\.\d+)?[ptgmk]?b \s+ \n)+ $/
- do:
cat.nodes:
h: heap.*
v: true
- match:
$body: |
/^ heap\.current \s+ heap\.percent \s+ heap\.max \s+ \n
(\s+ \d+(\.\d+)?[ptgmk]?b \s+ \d+ \s+ \d+(\.\d+)?[ptgmk]?b \s+ \n)+ $/
- do:
cat.nodes:
h: file_desc.current,file_desc.percent,file_desc.max
v: true
- match:
# Windows reports -1 for the file descriptor counts.
$body: |
/^ file_desc\.current \s+ file_desc\.percent \s+ file_desc\.max \s+ \n
(\s+ (-1|\d+) \s+ \d+ \s+ (-1|\d+) \s+ \n)+ $/