mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
Fix the unit tests for TestPrettyPrintOff
A different failing test masked that this wasn't even being run. Pointy Hat: sean- for testing first on Travis in a branch vs verifying locally
This commit is contained in:
@@ -175,8 +175,10 @@ func (s *HTTPServer) wrap(handler func(resp http.ResponseWriter, req *http.Reque
|
||||
}
|
||||
|
||||
prettyPrint := false
|
||||
if _, ok := req.URL.Query()["pretty"]; ok {
|
||||
prettyPrint = true
|
||||
if v, ok := req.URL.Query()["pretty"]; ok {
|
||||
if len(v) > 0 && (len(v[0]) == 0 || v[0] != "0") {
|
||||
prettyPrint = true
|
||||
}
|
||||
}
|
||||
|
||||
// Write out the JSON object
|
||||
|
||||
Reference in New Issue
Block a user