diff options
author | Andrey Zelenkov <zelenkov@nginx.com> | 2019-08-14 14:06:22 +0300 |
---|---|---|
committer | Andrey Zelenkov <zelenkov@nginx.com> | 2019-08-14 14:06:22 +0300 |
commit | b3b7013edaa142318349e46825f250b7ab6b2bc0 (patch) | |
tree | 4078f4a3cdf3c03312a9083d0de468757fecb75f /test/test_php_basic.py | |
parent | 78fbf9ee60a1cf4306a65c15ecce8dafbe6bf862 (diff) | |
download | unit-b3b7013edaa142318349e46825f250b7ab6b2bc0.tar.gz unit-b3b7013edaa142318349e46825f250b7ab6b2bc0.tar.bz2 |
Tests: added tests for deleting listeners and applications objects.
Diffstat (limited to 'test/test_php_basic.py')
-rw-r--r-- | test/test_php_basic.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/test_php_basic.py b/test/test_php_basic.py index 02ff81de..be5064ba 100644 --- a/test/test_php_basic.py +++ b/test/test_php_basic.py @@ -164,6 +164,32 @@ class TestPHPBasic(TestControl): 'error', self.conf_delete('applications/app'), 'delete app again' ) + def test_php_delete_blocks(self): + self.conf(self.conf_basic) + + self.assertIn( + 'success', + self.conf_delete('listeners'), + 'listeners delete', + ) + + self.assertIn( + 'success', + self.conf_delete('applications'), + 'applications delete', + ) + + self.assertIn( + 'success', + self.conf(self.conf_app, 'applications'), + 'listeners restore', + ) + + self.assertIn( + 'success', + self.conf({"*:7080": {"pass": "applications/app"}}, 'listeners'), + 'applications restore', + ) if __name__ == '__main__': TestPHPBasic.main() |