flush_test.go 463 B

12345678910111213141516171819202122
  1. // Copyright 2012-2015 Oliver Eilhard. All rights reserved.
  2. // Use of this source code is governed by a MIT-license.
  3. // See http://olivere.mit-license.org/license.txt for details.
  4. package elastic
  5. import (
  6. "testing"
  7. )
  8. func TestFlush(t *testing.T) {
  9. client := setupTestClientAndCreateIndex(t)
  10. // Flush all indices
  11. res, err := client.Flush().Do()
  12. if err != nil {
  13. t.Fatal(err)
  14. }
  15. if res == nil {
  16. t.Errorf("expected res to be != nil; got: %v", res)
  17. }
  18. }