Test: Added diagnostics command test

This commit is contained in:
Paul Beckingham
2015-07-18 19:34:08 -04:00
parent 7ab4142c07
commit d18a46da01

View File

@@ -35,14 +35,20 @@ sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from basetest import Task, TestCase
class TestDiagColor(TestCase):
class TestDiagnostics(TestCase):
def setUp(self):
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"""
code, out, err = self.t.diag()
self.tap(out)
self.assertRegexpMatches(out, "Compliance:\s+C\+\+11")
self.assertRegexpMatches(out, "libgnutls:\s+\d+\.\d+\.\d+")
if __name__ == "__main__":