1// Copyright 2012-present 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
5package elastic
6
7import "testing"
8
9func TestClientPlugins(t *testing.T) {
10	client, err := NewClient()
11	if err != nil {
12		t.Fatal(err)
13	}
14	_, err = client.Plugins()
15	if err != nil {
16		t.Fatal(err)
17	}
18}
19
20func TestClientHasPlugin(t *testing.T) {
21	client, err := NewClient()
22	if err != nil {
23		t.Fatal(err)
24	}
25	found, err := client.HasPlugin("no-such-plugin")
26	if err != nil {
27		t.Fatal(err)
28	}
29	if found {
30		t.Fatalf("expected to not find plugin %q", "no-such-plugin")
31	}
32}
33