diff options
author | nicolargo <nicolas@nicolargo.com> | 2023-03-12 09:44:43 +0100 |
---|---|---|
committer | nicolargo <nicolas@nicolargo.com> | 2023-03-12 09:44:43 +0100 |
commit | db4bd0d136707ffe58620825aa147eff1d3640bf (patch) | |
tree | 8a4676eb7cbdc2634ae4062bf0ed46f47855296c /unitest-restful.py | |
parent | 70aa46d4a0b6ad8ff6f4aa02eaad1d938ab891e3 (diff) | |
parent | 43291246de969abef0acfcc9fe1841cd0ac95d9c (diff) |
Merge from develop
Diffstat (limited to 'unitest-restful.py')
-rwxr-xr-x | unitest-restful.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/unitest-restful.py b/unitest-restful.py index ea8da34a..f9455385 100755 --- a/unitest-restful.py +++ b/unitest-restful.py @@ -222,6 +222,16 @@ class TestGlances(unittest.TestCase): self.assertIsInstance(req.json(), dict) self.assertIsInstance(req.json()['interface_name'], list) + def test_012_status(self): + """Check status endpoint.""" + method = "status" + print('INFO: [TEST_012] Status') + print("HTTP RESTful request: %s/%s" % (URL, method)) + req = self.http_get("%s/%s" % (URL, method)) + + self.assertTrue(req.ok) + self.assertEqual(req.text, "Active") + def test_999_stop_server(self): """Stop the Glances Web Server.""" print('INFO: [TEST_999] Stop the Glances Web Server') |