mirror of
https://github.com/alice-lg/alice-lg.git
synced 2024-05-11 05:55:03 +00:00
26 lines
425 B
Go
26 lines
425 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
)
|
|
|
|
func TestApiLogSourceError(t *testing.T) {
|
|
err := fmt.Errorf("an unexpected error occured")
|
|
|
|
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)
|
|
}
|