mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-01 08:29:09 +00:00
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:
parent
1ff5b318be
commit
49b6f670ad
@ -58,13 +58,13 @@ setup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@test "[UPGRADE] index some documents into a few indexes" {
|
@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"
|
"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"
|
"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"
|
"title": "The Left Hand of Darkness"
|
||||||
}'
|
}'
|
||||||
}
|
}
|
||||||
|
@ -481,12 +481,12 @@ run_elasticsearch_tests() {
|
|||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
echo "$output" | grep -w "green"
|
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",
|
"title": "Book #1",
|
||||||
"pages": 123
|
"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",
|
"title": "Book #2",
|
||||||
"pages": 456
|
"pages": 456
|
||||||
}'
|
}'
|
||||||
@ -494,7 +494,7 @@ run_elasticsearch_tests() {
|
|||||||
curl -s -XGET 'http://localhost:9200/_count?pretty' |
|
curl -s -XGET 'http://localhost:9200/_count?pretty' |
|
||||||
grep \"count\"\ :\ 2
|
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": {
|
"query": {
|
||||||
"script": {
|
"script": {
|
||||||
"script": {
|
"script": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user