coredns/plugin/kubernetes/watch_test.go
John Belamaric 99287d091c
Watch feature (#1527)
* Add part 1 watch functionality. (squashed)

* add funcs for service/endpoint fqdns

* add endpoints watch

* document exposed funcs

* only send subset deltas

* locking for watch map

* tests and docs

* add pod watch

* remove debugs prints

* feedback part 1

* add error reporting to proto

* inform clients of server stop+errors

* add grpc options param

* use proper context

* Review feedback:
 * Removed client (will move to another repo)
 * Use new log functions
 * Change watchChan to be for string not []string
 * Rework how k8s plugin stores watch tracking info to simplify
 * Normalize the qname on watch request

* Add blank line back

* Revert another spurious change

* Fix tests

* Add stop channel.
Fix tests.
Better docs for plugin interface.

* fmt.Printf -> log.Warningf

* Move from dnsserver to plugin/pkg/watch

* gofmt

* remove dead client watches

* sate linter

* linter omg
2018-06-27 07:45:32 -07:00

15 lines
286 B
Go

package kubernetes
import (
"testing"
"github.com/coredns/coredns/plugin/pkg/watch"
)
func TestIsWatchable(t *testing.T) {
k := &Kubernetes{}
var i interface{} = k
if _, ok := i.(watch.Watchable); !ok {
t.Error("Kubernetes should implement watch.Watchable and does not")
}
}