Skip to content

Commit 997a401

Browse files
committed
Update to ES 7.7.0
This commit adds compatiblity with Elasticsearch 7.7.0. It fixes two tests that failed due to the update.
1 parent 639b7f6 commit 997a401

4 files changed

+8
-5
lines changed

cat_shards.go

+2
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,8 @@ type CatShardsResponseRow struct {
316316
WarmerCurrent int `json:"warmer.current,string"` // current warmer ops on primaries & replicas
317317
WarmerTotal int `json:"warmer.total,string"` // total warmer ops on primaries & replicas
318318
WarmerTotalTime string `json:"warmer.total_time"` // time spent in warmers on primaries & replicas, e.g. "47s"
319+
PathData string `json:"path.data"`
320+
PathState string `json:"path.state"`
319321
}
320322

321323
// catShardsResponseRowAliasesMap holds the global map for columns aliases

cat_shards_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import (
1010
)
1111

1212
func TestCatShards(t *testing.T) {
13-
client := setupTestClientAndCreateIndexAndAddDocs(t, SetDecoder(&strictDecoder{})) // , SetTraceLog(log.New(os.Stdout, "", 0)))
13+
client := setupTestClientAndCreateIndexAndAddDocs(t, SetDecoder(&strictDecoder{})) //, SetTraceLog(log.New(os.Stdout, "", 0)))
1414
ctx := context.Background()
15-
res, err := client.CatShards().Columns("*").Do(ctx)
15+
res, err := client.CatShards().Columns("*").Pretty(true).Do(ctx)
1616
if err != nil {
1717
t.Fatal(err)
1818
}

docker-compose.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: '3'
22

33
services:
44
elasticsearch:
5-
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.6.2
5+
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.7.0
66
hostname: elasticsearch
77
environment:
88
- cluster.name=elasticsearch
@@ -28,7 +28,7 @@ services:
2828
ports:
2929
- 9200:9200
3030
platinum:
31-
image: docker.elastic.co/elasticsearch/elasticsearch:7.6.2
31+
image: docker.elastic.co/elasticsearch/elasticsearch:7.7.0
3232
hostname: elasticsearch-platinum
3333
environment:
3434
- cluster.name=platinum

scroll_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -418,12 +418,13 @@ func TestScrollWithMaxResponseSize(t *testing.T) {
418418
}
419419

420420
// Test response size error on second scroll request (first response is 418 bytes, second is 439 bytes)
421-
svc = client.Scroll(testIndexName).Size(1).MaxResponseSize(420)
421+
svc = client.Scroll(testIndexName).Size(1).MaxResponseSize(16384)
422422
_, err = svc.Do(context.TODO())
423423
if err != nil {
424424
t.Fatal(err)
425425
}
426426

427+
svc = client.Scroll(testIndexName).Size(1).MaxResponseSize(400)
427428
_, err = svc.Do(context.TODO())
428429
if err != ErrResponseSize {
429430
t.Fatalf("expected response size error")

0 commit comments

Comments
 (0)