Test: Added diagnostics command test
This commit is contained in:
10
test/diag.t
10
test/diag.t
@@ -35,14 +35,20 @@ sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
|||||||
from basetest import Task, TestCase
|
from basetest import Task, TestCase
|
||||||
|
|
||||||
|
|
||||||
class TestDiagColor(TestCase):
|
class TestDiagnostics(TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.t = Task()
|
self.t = Task()
|
||||||
|
self.t.config("editor", "edlin")
|
||||||
|
self.t.config("taskd.ca", "/tmp/ca")
|
||||||
|
self.t.config("taskd.trust", "strict")
|
||||||
|
self.t.config("taskd.credentials", "us/me/xxx")
|
||||||
|
|
||||||
def test_diag_color_builtin(self):
|
def test_diagnostics(self):
|
||||||
"""Task diag output, so we can monitor platforms"""
|
"""Task diag output, so we can monitor platforms"""
|
||||||
code, out, err = self.t.diag()
|
code, out, err = self.t.diag()
|
||||||
self.tap(out)
|
self.tap(out)
|
||||||
|
self.assertRegexpMatches(out, "Compliance:\s+C\+\+11")
|
||||||
|
self.assertRegexpMatches(out, "libgnutls:\s+\d+\.\d+\.\d+")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
Reference in New Issue
Block a user