XrayR-project / XrayR

A Xray backend framework that can easily support many panels. 一个基于Xray的后端框架,支持V2ay,Trojan,Shadowsocks协议,极易扩展,支持多面板对接
https://xrayr-project.github.io/XrayR-doc/
Mozilla Public License 2.0
2.06k stars 827 forks source link

GetNodeRule,v2board测试方法报错 #689

Open singleDog1123 opened 1 month ago

singleDog1123 commented 1 month ago

image

面板环境:XBoard v1.0.0 报错提示:

GOROOT=E:\golang #gosetup
GOPATH=C:\Users\lys\go #gosetup
GOPROXY=https://goproxy.cn #gosetup
E:\golang\bin\go.exe test -c -o C:\Users\lll\AppData\Local\JetBrains\IntelliJIdea2024.1\tmp\GoLand\___TestGetNodeRule_in_github_com_XrayR_project_XrayR_api_newV2board__1_.test.exe github.com/XrayR-project/XrayR/api/newV2board #gosetup
E:\golang\bin\go.exe tool test2json -t C:\Users\lll\AppData\Local\JetBrains\IntelliJIdea2024.1\tmp\GoLand\___TestGetNodeRule_in_github_com_XrayR_project_XrayR_api_newV2board__1_.test.exe -test.v -test.paniconexit0 -test.run ^\QTestGetNodeRule\E$ #gosetup
=== RUN   TestGetNodeRule
--- FAIL: TestGetNodeRule (0.00s)
panic: interface conversion: interface {} is nil, not *newV2board.serverConfig [recovered]
    panic: interface conversion: interface {} is nil, not *newV2board.serverConfig

goroutine 8 [running]:
testing.tRunner.func1.2({0xd8a080, 0xc000253020})
    E:/golang/src/testing/testing.go:1631 +0x24a
testing.tRunner.func1()
    E:/golang/src/testing/testing.go:1634 +0x377
panic({0xd8a080?, 0xc000253020?})
    E:/golang/src/runtime/panic.go:770 +0x132
github.com/XrayR-project/XrayR/api/newV2board.(*APIClient).GetNodeRule(0x1742c00?)
    F:/gitproject/github/XrayR/api/newV2board/v2board.go:287 +0x206
github.com/XrayR-project/XrayR/api/newV2board_test.TestGetNodeRule(0xc000274340)
    F:/gitproject/github/XrayR/api/newV2board/v2board_test.go:103 +0x42
testing.tRunner(0xc000274340, 0xfcd330)
    E:/golang/src/testing/testing.go:1689 +0xfb
created by testing.(*T).Run in goroutine 1
    E:/golang/src/testing/testing.go:1742 +0x390

Process finished with the exit code 1
github-actions[bot] commented 2 days ago

This issue is stale because it has been open for 30 days with no activity.