1
0
mirror of https://github.com/alice-lg/alice-lg.git synced 2024-05-11 05:55:03 +00:00
alice-lg-alice-lg/backend/api_logging_test.go

26 lines
425 B
Go
Raw Normal View History

2018-10-02 13:04:48 +02:00
package main
import (
"fmt"
"testing"
)
2018-10-02 14:52:32 +02:00
func TestApiLogSourceError(t *testing.T) {
2018-10-02 13:04:48 +02:00
err := fmt.Errorf("an unexpected error occured")
2018-10-02 14:52:32 +02:00
conf := &Config{
Sources: []*SourceConfig{
&SourceConfig{
Id: 0,
Name: "rs1.example.net (IPv4)",
},
},
}
AliceConfig = conf
apiLogSourceError("foo.bar", 0, 23, "Test")
apiLogSourceError("foo.bam", 0, err)
apiLogSourceError("foo.baz", 0, 23, 42, "foo", err)
2018-10-02 13:04:48 +02:00
}