Fix after merge
This commit is contained in:
parent
34b1c403bb
commit
c3607c23e7
@ -13,10 +13,10 @@ func (k *klog) Write(l log.Record) {
|
||||
write(l)
|
||||
}
|
||||
|
||||
func (k *klog) Stream(stop chan bool) <-chan log.Record {
|
||||
c := make(chan log.Record)
|
||||
func (k *klog) Stream() (<-chan log.Record, chan bool) {
|
||||
c, s := make(chan log.Record), make(chan bool)
|
||||
go close(c)
|
||||
return c
|
||||
return c, s
|
||||
}
|
||||
|
||||
// New returns a configured Kubernetes logger
|
||||
|
@ -41,11 +41,12 @@ func TestKubernetes(t *testing.T) {
|
||||
|
||||
assert.Nil(t, k.Read(), "Read should be unimplemented")
|
||||
|
||||
stream := k.Stream(make(chan bool))
|
||||
stream, stop := k.Stream()
|
||||
records := []log.Record{}
|
||||
for s := range stream {
|
||||
records = append(records, s)
|
||||
}
|
||||
close(stop)
|
||||
assert.Equal(t, 0, len(records), "Stream should be unimplemented")
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user