Просмотр исходного кода

Add test and changelog entry for 2aef402eb08cadcd9afc87d28cdcab7107bb3e02

Mike Naberezny 11 лет назад
Родитель
Сommit
9a407b415e
2 измененных файлов с 17 добавлено и 0 удалено
  1. 3 0
      CHANGES.txt
  2. 14 0
      supervisor/tests/test_options.py

+ 3 - 0
CHANGES.txt

@@ -59,6 +59,9 @@
 - Fixed a hang that could occur in ``supervisord`` if log rotation is used
   and an outside program deletes an active log file.  Patch by Magnus Lycka.
 
+- A warning is now logged if a glob pattern in an ``[include]`` section does
+  not match any files.  Patch by Daniel Hahler.
+
 3.0 (2013-07-30)
 ----------------
 

+ 14 - 0
supervisor/tests/test_options.py

@@ -657,6 +657,20 @@ class ServerOptionsTests(unittest.TestCase):
         else:
             raise AssertionError("Didn't raise")
 
+    def test_include_with_no_matching_files_logs_warning(self):
+        instance = self._makeOne()
+        text = lstrip("""\
+        [supervisord]
+        user=root
+
+        [include]
+        files=nonexistant/*
+        """)
+        instance.configfile = StringIO(text)
+        instance.realize(args=[])
+        self.assertEqual(instance.parse_warnings,
+                         ['No file matches via include "./nonexistant/*"'])
+
     def test_get_pid(self):
         instance = self._makeOne()
         self.assertEqual(os.getpid(), instance.get_pid())