diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-08-30 16:03:23 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-09-04 15:27:10 -0400 |
commit | 110861ec9d8cd70dc75ca8ca33b66db8060e761c (patch) | |
tree | 66ccabde67373d663da0d0bbfcbe49651fa86c25 /testsuite/Testsrc/Testlib/TestServer | |
parent | 0f7b300fe182c48c7e4c36e43a1f439fcde8fb54 (diff) | |
download | bcfg2-110861ec9d8cd70dc75ca8ca33b66db8060e761c.tar.gz bcfg2-110861ec9d8cd70dc75ca8ca33b66db8060e761c.tar.bz2 bcfg2-110861ec9d8cd70dc75ca8ca33b66db8060e761c.zip |
XMLFileBacked: Monitor XIncludes whenever a FAM is available
This monitors XIncluded files even if should_monitor=False, since the
object monitoring the base file will not monitor XIncludes. This
ensures that XIncluded files are properly monitored whenever possible,
particularly for Bundler and Properties.
This is a partial backport of 5b66845 -- as much of a backport as is
possible without a module-level FAM object.
Diffstat (limited to 'testsuite/Testsrc/Testlib/TestServer')
-rw-r--r-- | testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py b/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py index 94866cf39..5ae0dfcba 100644 --- a/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py +++ b/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py @@ -623,17 +623,9 @@ class TestXMLFileBacked(TestFileBacked): self.assertIn("/test/test2.xml", xfb.extra_monitors) fam = Mock() - if self.should_monitor is not True: - fam.reset_mock() - xfb = self.get_obj(fam=fam) - fam.reset_mock() - xfb.add_monitor("/test/test3.xml") - self.assertFalse(fam.AddMonitor.called) - self.assertIn("/test/test3.xml", xfb.extra_monitors) - - if self.should_monitor is not False: - fam.reset_mock() - xfb = self.get_obj(fam=fam, should_monitor=True) + fam.reset_mock() + xfb = self.get_obj(fam=fam) + if xfb.fam: xfb.add_monitor("/test/test4.xml") fam.AddMonitor.assert_called_with("/test/test4.xml", xfb) self.assertIn("/test/test4.xml", xfb.extra_monitors) |