mirror of https://github.com/v2ray/v2ray-core
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
511 B
26 lines
511 B
package internal_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
. "v2ray.com/core/app/log/internal"
|
|
"v2ray.com/core/testing/assert"
|
|
)
|
|
|
|
func TestAccessLog(t *testing.T) {
|
|
assert := assert.On(t)
|
|
|
|
entry := &AccessLog{
|
|
From: "test_from",
|
|
To: "test_to",
|
|
Status: "Accepted",
|
|
Reason: "test_reason",
|
|
}
|
|
|
|
entryStr := entry.String()
|
|
assert.String(entryStr).Contains("test_from")
|
|
assert.String(entryStr).Contains("test_to")
|
|
assert.String(entryStr).Contains("test_reason")
|
|
assert.String(entryStr).Contains("Accepted")
|
|
}
|