mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-09 13:50:18 -06:00
Fix staticcheck
This commit is contained in:
committed by
Jörn Friedrich Dreyer
parent
7c7cefef9e
commit
3e0eb3edc2
@@ -245,12 +245,12 @@ func assertEmptyResponse(t *testing.T, format string, res *httptest.ResponseReco
|
||||
var response EmptyResponse
|
||||
if format == "json" {
|
||||
if err := json.Unmarshal(res.Body.Bytes(), &response); err != nil {
|
||||
t.Log(string(res.Body.Bytes()))
|
||||
t.Log(res.Body.String())
|
||||
t.Fatal(err)
|
||||
}
|
||||
} else {
|
||||
if err := xml.Unmarshal(res.Body.Bytes(), &response.Ocs); err != nil {
|
||||
t.Log(string(res.Body.Bytes()))
|
||||
t.Log(res.Body.String())
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
@@ -453,6 +453,9 @@ func init() {
|
||||
tokenManager, err = jwt.New(map[string]interface{}{
|
||||
"secret": jwtSecret,
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatalf("could not create token manager: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func cleanUp(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user