mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-25 07:20:44 +00:00
allow dynamic type of user accounts
This commit is contained in:
1 parent
87f664048b
commit
3f9cb1136a
18 files changed
+123
-49
No files matched your search
@@ -21,8 +21,11 @@ func TestUserParsing(t *testing.T) {
|
||||
"alterId": 100
|
||||
}`), user)
|
||||
assert.Error(err).IsNil()
|
||||
assert.String(user.ID.String()).Equals("96edb838-6d68-42ef-a933-25f7ac3a9d09")
|
||||
assert.Byte(byte(user.Level)).Equals(1)
|
||||
|
||||
account, ok := user.Account.(*VMessAccount)
|
||||
assert.Bool(ok).IsTrue()
|
||||
assert.String(account.ID.String()).Equals("96edb838-6d68-42ef-a933-25f7ac3a9d09")
|
||||
}
|
||||
|
||||
func TestInvalidUserJson(t *testing.T) {
|
||||
|
||||
Reference in new issue
Block a user