diff options
author | Tim Laszlo <tim.laszlo@gmail.com> | 2012-10-24 07:38:34 -0500 |
---|---|---|
committer | Tim Laszlo <tim.laszlo@gmail.com> | 2012-10-24 07:38:34 -0500 |
commit | 6bd2f69645884dd6692a1bab0d3f25ac6414131a (patch) | |
tree | 33478a601089cea838daf135f634c104be296842 /testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProbes.py | |
parent | 2ec42ab01bb7d120dff8a985a3c73b9c4caa53ce (diff) | |
download | bcfg2-6bd2f69645884dd6692a1bab0d3f25ac6414131a.tar.gz bcfg2-6bd2f69645884dd6692a1bab0d3f25ac6414131a.tar.bz2 bcfg2-6bd2f69645884dd6692a1bab0d3f25ac6414131a.zip |
Fix tests for probes
Diffstat (limited to 'testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProbes.py')
-rw-r--r-- | testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProbes.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProbes.py b/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProbes.py index 38d3c08e6..ac6f6b8e7 100644 --- a/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProbes.py +++ b/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProbes.py @@ -502,6 +502,8 @@ text for cname, cdata in self.get_test_probedata().items(): client = Mock() client.hostname = cname + cgroups = [] + cprobedata = ClientProbeDataSet() for pname, pdata in cdata.items(): dataitem = lxml.etree.Element("Probe", name=pname) if pname == "text": @@ -514,11 +516,13 @@ text else: dataitem.text = str(pdata) - probes.ReceiveDataItem(client, dataitem) + probes.ReceiveDataItem(client, dataitem, cgroups, cprobedata) - self.assertIn(client.hostname, probes.probedata) - self.assertIn(pname, probes.probedata[cname]) - self.assertEqual(pdata, probes.probedata[cname][pname]) + probes.cgroups[client.hostname] = cgroups + probes.probedata[client.hostname] = cprobedata + self.assertIn(client.hostname, probes.probedata) + self.assertIn(pname, probes.probedata[cname]) + self.assertEqual(pdata, probes.probedata[cname][pname]) self.assertIn(client.hostname, probes.cgroups) self.assertEqual(probes.cgroups[cname], self.get_test_cgroups()[cname]) |