Send content-type header in packaging tests

In the packaging tests we make some requests to Elasticsearch as part of
the tests. These requests were not setting the content-type header. This
commit addresses this.
This commit is contained in:
Jason Tedor 2017-02-20 15:56:09 -05:00
parent 1ff5b318be
commit 49b6f670ad
2 changed files with 6 additions and 6 deletions

View File

@ -58,13 +58,13 @@ setup() {
}
@test "[UPGRADE] index some documents into a few indexes" {
curl -s -XPOST localhost:9200/library/book/1?pretty -d '{
curl -s -H "Content-Type: application/json" -XPOST localhost:9200/library/book/1?pretty -d '{
"title": "Elasticsearch - The Definitive Guide"
}'
curl -s -XPOST localhost:9200/library/book/2?pretty -d '{
curl -s -H "Content-Type: application/json" -XPOST localhost:9200/library/book/2?pretty -d '{
"title": "Brave New World"
}'
curl -s -XPOST localhost:9200/library2/book/1?pretty -d '{
curl -s -H "Content-Type: application/json" -XPOST localhost:9200/library2/book/1?pretty -d '{
"title": "The Left Hand of Darkness"
}'
}

View File

@ -481,12 +481,12 @@ run_elasticsearch_tests() {
[ "$status" -eq 0 ]
echo "$output" | grep -w "green"
curl -s -XPOST 'http://localhost:9200/library/book/1?refresh=true&pretty' -d '{
curl -s -H "Content-Type: application/json" -XPOST 'http://localhost:9200/library/book/1?refresh=true&pretty' -d '{
"title": "Book #1",
"pages": 123
}'
curl -s -XPOST 'http://localhost:9200/library/book/2?refresh=true&pretty' -d '{
curl -s -H "Content-Type: application/json" -XPOST 'http://localhost:9200/library/book/2?refresh=true&pretty' -d '{
"title": "Book #2",
"pages": 456
}'
@ -494,7 +494,7 @@ run_elasticsearch_tests() {
curl -s -XGET 'http://localhost:9200/_count?pretty' |
grep \"count\"\ :\ 2
curl -s -XPOST 'http://localhost:9200/library/book/_count?pretty' -d '{
curl -s -H "Content-Type: application/json" -XPOST 'http://localhost:9200/library/book/_count?pretty' -d '{
"query": {
"script": {
"script": {