1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-09 03:37:37 -05:00
v2fly/app/log/internal/log_entry_test.go

26 lines
511 B
Go
Raw Normal View History

2016-05-12 02:24:41 -04:00
package internal_test
import (
"testing"
2017-02-01 15:35:40 -05:00
. "v2ray.com/core/app/log/internal"
2016-08-20 14:55:45 -04:00
"v2ray.com/core/testing/assert"
2016-05-12 02:24:41 -04:00
)
func TestAccessLog(t *testing.T) {
2016-05-24 15:55:46 -04:00
assert := assert.On(t)
2016-05-12 02:24:41 -04:00
entry := &AccessLog{
2016-05-24 16:41:51 -04:00
From: "test_from",
To: "test_to",
2016-05-12 02:24:41 -04:00
Status: "Accepted",
2016-05-24 16:41:51 -04:00
Reason: "test_reason",
2016-05-12 02:24:41 -04:00
}
entryStr := entry.String()
2016-05-24 15:55:46 -04:00
assert.String(entryStr).Contains("test_from")
assert.String(entryStr).Contains("test_to")
assert.String(entryStr).Contains("test_reason")
assert.String(entryStr).Contains("Accepted")
2016-05-12 02:24:41 -04:00
}