mirror of
https://github.com/containers/podman.git
synced 2025-06-17 23:20:59 +08:00
@ -72,6 +72,7 @@ func DiskUsage(w http.ResponseWriter, r *http.Request) {
|
|||||||
response, err := ic.SystemDf(r.Context(), options)
|
response, err := ic.SystemDf(r.Context(), options)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.InternalServerError(w, err)
|
utils.InternalServerError(w, err)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
utils.WriteResponse(w, http.StatusOK, response)
|
utils.WriteResponse(w, http.StatusOK, response)
|
||||||
}
|
}
|
||||||
|
@ -727,6 +727,10 @@ class TestApi(unittest.TestCase):
|
|||||||
start = json.loads(r.text)
|
start = json.loads(r.text)
|
||||||
self.assertGreater(len(start["Errs"]), 0, r.text)
|
self.assertGreater(len(start["Errs"]), 0, r.text)
|
||||||
|
|
||||||
|
def test_df(self):
|
||||||
|
r = requests.get(_url("/system/df"))
|
||||||
|
self.assertEqual(r.status_code, 200, r.text)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
Reference in New Issue
Block a user