summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-08-30 11:35:57 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-08-30 11:36:00 -0400
commit5b66845d01a507120503c19e40829c6394d47b93 (patch)
tree6111063e58990290f238297ea1b44b1b47924282 /testsuite
parent616bcab0374a4ac7f79e4a5101003ebfb820364e (diff)
downloadbcfg2-5b66845d01a507120503c19e40829c6394d47b93.tar.gz
bcfg2-5b66845d01a507120503c19e40829c6394d47b93.tar.bz2
bcfg2-5b66845d01a507120503c19e40829c6394d47b93.zip
XMLFileBacked: always watch xincludes
In Bcfg2 1.3, XInclude'd files only got FAM watches if the parent file was monitoring itself, and it got a FAM object passed to it. This led to some ugly workarounds, and bugs -- you couldn't easily use XInclude in Properties or Bundler, for instance, and have changes recognized. Since FAM objects are now module-level, we can always monitor XInclude'd files.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py18
1 files changed, 5 insertions, 13 deletions
diff --git a/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py b/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py
index c339b9e1d..dbab60abc 100644
--- a/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py
+++ b/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py
@@ -606,19 +606,11 @@ class TestXMLFileBacked(TestFileBacked):
xfb.add_monitor("/test/test2.xml")
self.assertIn("/test/test2.xml", xfb.extra_monitors)
- if self.should_monitor is not True:
- xfb = self.get_obj()
- xfb.fam = Mock()
- xfb.add_monitor("/test/test3.xml")
- self.assertFalse(xfb.fam.AddMonitor.called)
- self.assertIn("/test/test3.xml", xfb.extra_monitors)
-
- if self.should_monitor is not False:
- xfb = self.get_obj(should_monitor=True)
- xfb.fam = Mock()
- xfb.add_monitor("/test/test4.xml")
- xfb.fam.AddMonitor.assert_called_with("/test/test4.xml", xfb)
- self.assertIn("/test/test4.xml", xfb.extra_monitors)
+ xfb = self.get_obj()
+ xfb.fam = Mock()
+ xfb.add_monitor("/test/test4.xml")
+ xfb.fam.AddMonitor.assert_called_with("/test/test4.xml", xfb)
+ self.assertIn("/test/test4.xml", xfb.extra_monitors)
class TestStructFile(TestXMLFileBacked):