[SPEC] Renamed benchmark endpoints

benchmark.submit -> benchmark
benchmark.list   -> list_benchmarks
benchmark.abort  -> abort_benchmark

And fixed the related tests
This commit is contained in:
Clinton Gormley 2014-04-22 19:14:26 +02:00
parent 029b13cf68
commit 5d7263b69e
7 changed files with 34 additions and 45 deletions

View File

@ -1,5 +1,5 @@
{
"benchmark.abort" : {
"abort_benchmark" : {
"documentation": "http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-benchmark.html",
"methods": ["POST"],
"url": {

View File

@ -1,5 +1,5 @@
{
"benchmark.submit" : {
"benchmark" : {
"documentation": "http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-benchmark.html",
"methods": ["PUT"],
"url": {
@ -16,7 +16,6 @@
},
"type": {
"type" : "string",
"required" : true,
"description" : "The name of the document type"
}
},

View File

@ -1,5 +1,5 @@
{
"benchmark.list" : {
"list_benchmarks" : {
"documentation": "http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-benchmark.html",
"methods": ["GET"],
"url": {
@ -16,7 +16,6 @@
},
"type": {
"type" : "string",
"required" : true,
"description" : "The name of the document type"
}
},

View File

@ -2,7 +2,7 @@
"Test benchmark abort":
- do:
benchmark.abort:
abort_benchmark:
name: my_benchmark
catch: request

View File

@ -1,7 +0,0 @@
---
"Test benchmark list":
- do:
benchmark.list: {}
catch: request

View File

@ -1,32 +0,0 @@
---
"Test benchmark submit":
- do:
indices.create:
index: test_1
body:
settings:
index:
number_of_replicas: 0
- do:
cluster.health:
wait_for_status: yellow
- do:
benchmark.submit:
index: test_1
body: {
"name": "my_benchmark",
"competitors": [ {
"name": "my_competitor",
"requests": [ {
"query": {
"match": { "_all": "*" }
}
} ]
} ]
}
catch: request

View File

@ -0,0 +1,30 @@
---
"Test benchmark submit":
- do:
indices.create:
index: test_1
body:
settings:
index:
number_of_replicas: 0
- do:
cluster.health:
wait_for_status: yellow
- do:
benchmark:
index: test_1
body:
"name": "my_benchmark"
"competitors":
-
"name": "my_competitor"
"requests":
-
"query":
"match": { "_all": "*" }
- match: { status: complete }