diff options
author | Christopher Speller <crspeller@gmail.com> | 2018-01-29 14:17:40 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-29 14:17:40 -0800 |
commit | 961c04cae992eadb42d286d2f85f8a675bdc68c8 (patch) | |
tree | 3408f2d06f847e966c53485e2d54c692cdd037c1 /vendor/gopkg.in/olivere/elastic.v5/reindex_test.go | |
parent | 8d66523ba7d9a77129844be476732ebfd5272d64 (diff) | |
download | chat-961c04cae992eadb42d286d2f85f8a675bdc68c8.tar.gz chat-961c04cae992eadb42d286d2f85f8a675bdc68c8.tar.bz2 chat-961c04cae992eadb42d286d2f85f8a675bdc68c8.zip |
Upgrading server dependancies (#8154)
Diffstat (limited to 'vendor/gopkg.in/olivere/elastic.v5/reindex_test.go')
-rw-r--r-- | vendor/gopkg.in/olivere/elastic.v5/reindex_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vendor/gopkg.in/olivere/elastic.v5/reindex_test.go b/vendor/gopkg.in/olivere/elastic.v5/reindex_test.go index 2ab604089..fadf4bfc7 100644 --- a/vendor/gopkg.in/olivere/elastic.v5/reindex_test.go +++ b/vendor/gopkg.in/olivere/elastic.v5/reindex_test.go @@ -166,7 +166,7 @@ func TestReindexSourceWithProceedOnVersionConflict(t *testing.T) { func TestReindexSourceWithQuery(t *testing.T) { client := setupTestClient(t) - src := NewReindexSource().Index("twitter").Type("tweet").Query(NewTermQuery("user", "olivere")) + src := NewReindexSource().Index("twitter").Type("doc").Query(NewTermQuery("user", "olivere")) dst := NewReindexDestination().Index("new_twitter") out, err := client.Reindex().Source(src).Destination(dst).getBody() if err != nil { @@ -177,7 +177,7 @@ func TestReindexSourceWithQuery(t *testing.T) { t.Fatal(err) } got := string(b) - want := `{"dest":{"index":"new_twitter"},"source":{"index":"twitter","query":{"term":{"user":"olivere"}},"type":"tweet"}}` + want := `{"dest":{"index":"new_twitter"},"source":{"index":"twitter","query":{"term":{"user":"olivere"}},"type":"doc"}}` if got != want { t.Fatalf("\ngot %s\nwant %s", got, want) } @@ -185,7 +185,7 @@ func TestReindexSourceWithQuery(t *testing.T) { func TestReindexSourceWithMultipleSourceIndicesAndTypes(t *testing.T) { client := setupTestClient(t) - src := NewReindexSource().Index("twitter", "blog").Type("tweet", "post") + src := NewReindexSource().Index("twitter", "blog").Type("doc", "post") dst := NewReindexDestination().Index("all_together") out, err := client.Reindex().Source(src).Destination(dst).getBody() if err != nil { @@ -196,7 +196,7 @@ func TestReindexSourceWithMultipleSourceIndicesAndTypes(t *testing.T) { t.Fatal(err) } got := string(b) - want := `{"dest":{"index":"all_together"},"source":{"index":["twitter","blog"],"type":["tweet","post"]}}` + want := `{"dest":{"index":"all_together"},"source":{"index":["twitter","blog"],"type":["doc","post"]}}` if got != want { t.Fatalf("\ngot %s\nwant %s", got, want) } @@ -235,7 +235,7 @@ func TestReindexSourceWithScript(t *testing.T) { t.Fatal(err) } got := string(b) - want := `{"dest":{"index":"new_twitter","version_type":"external"},"script":{"inline":"if (ctx._source.foo == 'bar') {ctx._version++; ctx._source.remove('foo')}"},"source":{"index":"twitter"}}` + want := `{"dest":{"index":"new_twitter","version_type":"external"},"script":{"source":"if (ctx._source.foo == 'bar') {ctx._version++; ctx._source.remove('foo')}"},"source":{"index":"twitter"}}` if got != want { t.Fatalf("\ngot %s\nwant %s", got, want) } |