OK, it's this test logs, not an old run.
This commit is contained in:
parent
4570046da6
commit
c46fb2be6c
|
@ -7,6 +7,7 @@ import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -69,6 +70,7 @@ func TestStreamingAcquisition(t *testing.T) {
|
||||||
log.SetOutput(os.Stdout)
|
log.SetOutput(os.Stdout)
|
||||||
log.SetLevel(log.InfoLevel)
|
log.SetLevel(log.InfoLevel)
|
||||||
log.Info("Test 'TestStreamingAcquisition'")
|
log.Info("Test 'TestStreamingAcquisition'")
|
||||||
|
title := time.Now().String()
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
config string
|
config string
|
||||||
expectedErr string
|
expectedErr string
|
||||||
|
@ -137,6 +139,9 @@ query: >
|
||||||
for i := 0; i < 20; i++ {
|
for i := 0; i < 20; i++ {
|
||||||
evt := <-out
|
evt := <-out
|
||||||
fmt.Println(evt)
|
fmt.Println(evt)
|
||||||
|
if !strings.HasSuffix(evt.Line.Raw, title) {
|
||||||
|
return fmt.Errorf("Incorrect suffix : %s", evt.Line.Raw)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
@ -157,7 +162,7 @@ query: >
|
||||||
for i := 0; i < 20; i++ {
|
for i := 0; i < 20; i++ {
|
||||||
streams.Streams[0].Values[i] = LogValue{
|
streams.Streams[0].Values[i] = LogValue{
|
||||||
Time: time.Now(),
|
Time: time.Now(),
|
||||||
Line: fmt.Sprintf("Log line #%d", i),
|
Line: fmt.Sprintf("Log line #%d %v", i, title),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
buff, err := json.Marshal(streams)
|
buff, err := json.Marshal(streams)
|
||||||
|
|
Loading…
Reference in a new issue