mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-29 16:58:34 +00:00
fix: expvar error when observatory is not enabled & various typos
This commit is contained in:
parent
70306c4ec8
commit
755268b7d4
4 changed files with 12 additions and 7 deletions
|
@ -1,6 +1,7 @@
|
|||
package scenarios
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
|
@ -99,7 +100,8 @@ func TestMetrics(t *testing.T) {
|
|||
if err2 != nil {
|
||||
t.Fatal(err2)
|
||||
}
|
||||
if string(body2)[0] != '{' {
|
||||
var json2 map[string]interface{}
|
||||
if json.Unmarshal(body2, &json2) != nil {
|
||||
t.Error("unexpected response body from expvars handler")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue