403Webshell
Server IP : 46.62.235.243  /  Your IP : 216.73.216.200
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux Linkabili3Dicembre 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.1.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/supervisor/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/supervisor/tests/__pycache__/test_supervisorctl.cpython-312.pyc
�

A�c{B���ddlZddlZddlmZddlmZddlmZddlmZm	Z	ddl
mZGd�dej�Z
Gd	�d
ej�ZGd�dej�ZGd
�dej�ZGd�d�ZGd�d�ZGd�d�ZGd�d�ZGd�d�Zd�Zedk(rej0d��yy)�N��xmlrpc)�StringIO)�	xmlrpclib)�LSBInitExitStatuses�LSBStatusExitStatuses)�DummyRPCServerc�<�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
y	)
�fgthread_Testsc��ddlm}|S)Nr)�fgthread)�supervisor.supervisorctlr
)�selfr
s  �E/usr/lib/python3/dist-packages/supervisor/tests/test_supervisorctl.py�_getTargetClasszfgthread_Tests._getTargetClass
s
��5���c�0�|j�||�S�N�r)r�program�ctls   r�_makeOnezfgthread_Tests._makeOnes��%�t�#�#�%�g�s�3�3rc��t�}t|�}|jd|�}|j|jd�y�NF)�DummyClientOptions�DummyControllerr�assertEqual�killed)r�optionsr�insts    r�	test_ctorzfgthread_Tests.test_ctors8��$�&���g�&���}�}�T�3�'��������e�,rc��t�}t|�}|jd|�}|jddd�}|j	||j
�y)N�call)rrr�globaltracer�
localtrace�rrrr �results     r�test_globaltrace_callz$fgthread_Tests.test_globaltrace_callsL��$�&���g�&���}�}�T�3�'���!�!�$���5���������1rc��t�}t|�}|jd|�}|jddd�}|j	|d�yr)rrrr$rr&s     r�test_globaltrace_noncallz'fgthread_Tests.test_globaltrace_noncallsH��$�&���g�&���}�}�T�3�'���!�!�$��d�3�������&rc��t�}t|�}|jd|�}d|_	|j	ddd�|jd�y#t$r&}|j|jd�Yd}~yd}~wwxYw)NT�linez(No exception thrown. Excepted SystemExit)	rrrrr%�fail�
SystemExitr�code)rrrr �es     r�test_localtrace_killed_whylinez-fgthread_Tests.test_localtrace_killed_whyline%sy��$�&���g�&���}�}�T�3�'�����	B��O�O�D�&�$�/�
�I�I�@�A���	+����Q�V�V�T�*�*��	+�s�A�	B�A?�?Bc��t�}t|�}|jd|�}d|_|j	ddd�}|j||j�y�NT)rrrrr%rr&s     r�"test_localtrace_killed_not_whylinez1fgthread_Tests.test_localtrace_killed_not_whyline1sQ��$�&���g�&���}�}�T�3�'���������t�T�2���������1rc��t�}t|�}|jd|�}d|_Gd�dt�}|�|_|�|_|j�|j|j�|j|j
j�|j|jj�y)NTc��eZdZd�Zy)�0fgthread_Tests.test_kill.<locals>.DummyCloseablec��d|_yr3��closed�rs r�closez6fgthread_Tests.test_kill.<locals>.DummyCloseable.close?s	��"��rN)�__name__�
__module__�__qualname__r<�rr�DummyCloseabler7>s��
#rrA)
rrrr�object�output_handler�
error_handler�kill�
assertTruer:)rrrr rAs     r�	test_killzfgthread_Tests.test_kill9s���$�&���g�&���}�}�T�3�'�����	#�V�	#�-�.���+�-����	�	��������$�����+�+�2�2�3�����*�*�1�1�2rN)r=r>r?rrr!r(r*r1r4rGr@rrrr	s+���4�-�2�'�
B�2�
3rrc���eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d �Z"d!�Z#d"�Z$d#�Z%d$�Z&d%�Z'y&)'�ControllerTestsc��ddlm}|S)Nr)�
Controller)rrK)rrKs  rrzControllerTests._getTargetClassIs��7��rc�.�|j�|�Srr�rrs  rrzControllerTests._makeOneMs��%�t�#�#�%�g�.�.rc��t�}|j|�}|j|j|jdz�y)Nz> )rrr�prompt�rr�
controllers   rr!zControllerTests.test_ctorQs7��$�&���]�]�7�+�
�����*�*�G�N�N�T�,A�Brc�~�t�}|j|�}|j�}|j|d�yr3)rr�upcheckr�rrrQr's    r�
test__upcheckzControllerTests.test__upcheckVs6��$�&���]�]�7�+�
��#�#�%�������&rc�(�t�}d�|jj_|j	|�}t�|_|j�}|j|d�|j|jj�d�y)Nc��y)Nz1.0r@)�xs r�<lambda>zDControllerTests.test__upcheck_wrong_server_version.<locals>.<lambda>^��rFzvSorry, this version of supervisorctl expects to talk to a server with API version 3.0, but the remote version is 1.0.
)
r�_server�
supervisor�
getVersionrr�stdoutrSr�getvaluerTs    r�"test__upcheck_wrong_server_versionz2ControllerTests.test__upcheck_wrong_server_version\sv��$�&��0@����"�"�-��]�]�7�+�
�$�J�
���#�#�%�������'�����*�*�3�3�5�9�	:rc�>��t�}ddlm��fd�}||jj_|j
|�}t�|_|j�}|j|d�|j|jj�d�y)Nr��Faultsc�D��tj�jd��)N�duh)r�Fault�UNKNOWN_METHODrbs�rr]z@ControllerTests.test__upcheck_unknown_method.<locals>.getVersionks����/�/�&�"7�"7��?�?rFz�Sorry, supervisord responded but did not recognize the supervisor namespace commands that supervisorctl uses to control it.  Please check that the [rpcinterface:supervisor] section is enabled in the configuration file (see sample.conf).
)r�supervisor.xmlrpcrcr[r\r]rrr^rSrr_)rrr]rQr'rcs     @r�test__upcheck_unknown_methodz,ControllerTests.test__upcheck_unknown_methodhs����$�&��,�	@�0:����"�"�-��]�]�7�+�
�$�J�
���#�#�%�������'�����*�*�3�3�5�1�	2rc�N��t�}ddlm��fd�}||jj_|j
|�}t�|_|jtj|j�|j|jtj �y)Nrrbc�D��tj�jd���N�)rrf�FAILED)�arg�kwrcs  �r�fzEControllerTests.test__upcheck_reraises_other_xmlrpc_faults.<locals>.f}s����/�/�&�-�-��4�4r)rrhrcr[r\r]rrr^�assertRaisesrrfrSr�
exitstatusr�GENERIC)rrrqrQrcs    @r�*test__upcheck_reraises_other_xmlrpc_faultsz:ControllerTests.test__upcheck_reraises_other_xmlrpc_faultszst���$�&��,�	5�01����"�"�-��]�]�7�+�
�$�J�
�����)�/�/�:�+=�+=�>�����.�.�0C�0K�0K�Lrc����t�}ddl�ddl���fd�}||jj_|j
|�}t�|_|j�}|j|d�|jj�}|jd|v�|j|jtj�y)Nrc�<���j�jd���Nznobody home��error�ECONNREFUSED�rorp�errno�sockets  ��r�raise_faultzTControllerTests.test__upcheck_catches_socket_error_ECONNREFUSED.<locals>.raise_fault������,�,�u�1�1�=�A�ArFzrefused connection)rr~r}r[r\r]rrr^rSrr_rFrsr�INSUFFICIENT_PRIVILEGES�rrrrQr'�outputr}r~s      @@r�/test__upcheck_catches_socket_error_ECONNREFUSEDz?ControllerTests.test__upcheck_catches_socket_error_ECONNREFUSED�s����$�&����	B�0;����"�"�-��]�]�7�+�
�$�J�
���#�#�%�������'��"�"�+�+�-�����,��6�7�����.�.�0C�0[�0[�\rc����t�}ddl�ddl���fd�}||jj_|j
|�}t�|_|j�}|j|d�|jj�}|jd|v�|j|jtj�y)Nrc�<���j�jd��rx�rz�ENOENTr|s  ��rrzNControllerTests.test__upcheck_catches_socket_error_ENOENT.<locals>.raise_fault�s����,�,�u�|�|�]�;�;rFzno such file)rr~r}r[r\r]rrr^rSrr_rFrsr�NOT_RUNNINGr�s      @@r�)test__upcheck_catches_socket_error_ENOENTz9ControllerTests.test__upcheck_catches_socket_error_ENOENT�s����$�&����	<�0;����"�"�-��]�]�7�+�
�$�J�
���#�#�%�������'��"�"�+�+�-������&�0�1�����.�.�0C�0O�0O�Prc����t�}ddl�ddl���fd�}||jj_|j
|�}t�|_|j�j|j�y)Nrc�<���j�jd��rl)rz�EBADFr|s  ��rrqzEControllerTests.test__upcheck_reraises_other_socket_faults.<locals>.f�s����,�,�u�{�{�B�/�/r)rr~r}r[r\r]rrr^rrrzrS)rrrqrQr}r~s    @@r�*test__upcheck_reraises_other_socket_faultsz:ControllerTests.test__upcheck_reraises_other_socket_faults�sZ���$�&����	0�01����"�"�-��]�]�7�+�
�$�J�
�����&�,�,�
�(:�(:�;rc��t�}|j|�}t�|_t	�}|f|j
_|jd�}|j|d�|j|jd�y)N�helpT)
rrrr^�DummyPluginr�plugins�onecmdr�helped)rrrQ�pluginr's     r�test_onecmdzControllerTests.test_onecmd�sm��$�&���]�]�7�+�
�$�J�
�����&,�Y�
���"��"�"�6�*�������&��������-rc�\�t�}|j|�}t�|_t	�}|f|j
_d|_|jd�|j|j�d|_|jd�|j|j�y)NFr�rm)rrrr^r�rr�r�r�rF�assertFalse)rrrQr�s    r�.test_onecmd_empty_does_not_repeat_previous_cmdz>ControllerTests.test_onecmd_empty_does_not_repeat_previous_cmd�s���$�&���]�]�7�+�
�$�J�
�����&,�Y�
���"���
����&�!�����
�
�&���
����"��������'rc��t�}|j|�}t�|_i|_|jd�|j
|jd�y)Nr�)rrrr^�_complete_infor�rrPs   r�#test_onecmd_clears_completion_cachez3ControllerTests.test_onecmd_clears_completion_cache�sN��$�&���]�]�7�+�
�$�J�
��$&�
�!����&�!�����2�2�D�9rc�"�t�}|j|�}t�|_|j	d�|j|jj
�d�|j|jtj�y)N�badcmdz*** Unknown syntax: badcmd
)
rrrr^r�rr_rsrrtrPs   r�test_onecmd_bad_command_errorz-ControllerTests.test_onecmd_bad_command_error�so��$�&���]�]�7�+�
�$�J�
�����(�#�����*�*�3�3�5�*�	,�����.�.�0C�0K�0K�Lrc��t�}|j|�}t�|_dg|_|jddd��}|j
|d�|jddd��}|j
|d�y)Nr�rmr�r,�help ��rrrr^�vocab�completerrTs    r�test_complete_action_emptyz*ControllerTests.test_complete_action_empty�sz��$�&���]�]�7�+�
�"�*�
��"�8�
���$�$�R���$�4�������)��$�$�R���$�4�������&rc��t�}|j|�}t�|_dg|_|jddd��}|j
|d�|jddd��}|j
|d�y)Nr��hrr�r�r�r�rTs    r�test_complete_action_partialz,ControllerTests.test_complete_action_partial�sz��$�&���]�]�7�+�
�"�*�
��"�8�
���$�$�S�!�#�$�6�������)��$�$�S�!�#�$�6�������&rc��t�}|j|�}t�|_dg|_|jddd��}|j
|d�y)Nr�rr�r�r�rTs    r�test_complete_action_wholez*ControllerTests.test_complete_action_whole�sS��$�&���]�]�7�+�
�"�*�
��"�8�
���$�$�V�Q�V�$�<�������)rc��t�}|j|�}t�|_|j	ddd��}|j|d�y)N�badrr�)rrrr^r�rrTs    r�*test_complete_unknown_action_uncompletablez:ControllerTests.test_complete_unknown_action_uncompletable�sI��$�&���]�]�7�+�
�"�*�
���$�$�U�A�E�$�:�������&rc��t�}|j|�}t�|_ddg|_|jddd��}|j
|d�y)Nr��addrmr�zbad r�r�rTs    r�.test_complete_unknown_action_arg_uncompletablez>ControllerTests.test_complete_unknown_action_arg_uncompletable�sU��$�&���]�]�7�+�
�"�*�
��"�E�?�
���$�$�R���$�8�������&rc�N�t�}|j|�}t�|_ddg|_|jddd��}|j
|d�|jddd��}|j
|d�|jdd	d��}|j
|d�y)
Nr��startrmrr�r�r��start �r�rTs    r�test_complete_help_emptyz(ControllerTests.test_complete_help_emptys���$�&���]�]�7�+�
�"�*�
��"�G�,�
���$�$�R���$�9�������)��$�$�R���$�9�������*��$�$�R���$�9�������&rc��t�}|j|�}t�|_ddg|_|jddd��}|j
|d�|jddd��}|j
|d�y)	Nr�r��herzhelp her�r�r�r�rTs    r�test_complete_help_actionz)ControllerTests.test_complete_help_actions}��$�&���]�]�7�+�
�"�*�
��"�G�,�
���$�$�T�1�9�$�=�������)��$�$�T�1�9�$�=�������&rc���t�}|j|�}t�|_ddg|_|jddd��}|j
|d�|jddd��}|j
|d	�|jdd
d��}|j
|d�|jddd��}|j
|d
�|jddd��}|j
|d�y)Nr�r�rmrr�r��foo r��bar r�zbaz:baz_01 �zbaz:* �r�rTs    r�test_complete_start_emptyz)ControllerTests.test_complete_start_emptys���$�&���]�]�7�+�
�"�*�
��"�G�,�
���$�$�R���$�:�������(��$�$�R���$�:�������(��$�$�R���$�:�������/��$�$�R���$�:�������*��$�$�R���$�:�������&rc��t�}|j|�}t�|_ddg|_|jddd��}|j
|d�|jddd��}|j
|d�y)	Nr�r�rqrzstart fr�r�r�r�rTs    r�test_complete_start_no_colonz,ControllerTests.test_complete_start_no_colon-s}��$�&���]�]�7�+�
�"�*�
��"�G�,�
���$�$�S�!�)�$�<�������(��$�$�S�!�)�$�<�������&rc�N�t�}|j|�}t�|_ddg|_|jddd��}|j
|d�|jddd��}|j
|d	�|jdd
d��}|j
|d�y)Nr�r��foo:rz
start foo:r�zfoo:foo r�zfoo:* r�r�rTs    r�test_complete_start_with_colonz.ControllerTests.test_complete_start_with_colon7s���$�&���]�]�7�+�
�"�*�
��"�G�,�
���$�$�V�Q�\�$�B�������,��$�$�V�Q�\�$�B�������*��$�$�V�Q�\�$�B�������&rc��t�}|j|�}t�|_ddg|_|jddd��}|j
|d�y)Nr�r�r�rz	start badr�r�rTs    r�!test_complete_start_uncompletablez1ControllerTests.test_complete_start_uncompletableCsV��$�&���]�]�7�+�
�"�*�
��"�G�,�
���$�$�U�A�K�$�@�������&rc�.�t�}|j|�}t�|_ddg|_|jddd��}|j
|d�d�}||jjj_
|jddd��y)	Nr�r�rmrr�r�c��td��)Nz(should not have called getAllProcessInfo)�	Exception)rorps  rrqz<ControllerTests.test_complete_caches_process_info.<locals>.fRs���F�G�Grr�)rrrr^r�r��assertNotEqualrr[r\�getAllProcessInfo)rrrQr'rqs     r�!test_complete_caches_process_infoz1ControllerTests.test_complete_caches_process_infoKs���$�&���]�]�7�+�
�"�*�
��"�G�,�
���$�$�R���$�:�����F�D�)�	H�BC�
���"�"�-�-�?����B����1rc��t�}|j|�}t�|_ddg|_|jddd��}|j
|d�|jddd��}|j
|d	�|jdd
d��}|j
|d�|jddd��}|j
|d�y)
Nr�r�rmrzadd r�r�r�r�r�zbaz r�r�rTs    r�test_complete_add_emptyz'ControllerTests.test_complete_add_emptyWs���$�&���]�]�7�+�
�"�*�
��"�E�?�
���$�$�R���$�8�������(��$�$�R���$�8�������(��$�$�R���$�8�������(��$�$�R���$�8�������&rc��t�}|j|�}t�|_ddg|_|jddd��}|j
|d�y)Nr�r�r�rzadd badr�r�rTs    r�test_complete_add_uncompletablez/ControllerTests.test_complete_add_uncompletableesU��$�&���]�]�7�+�
�"�*�
��"�E�?�
���$�$�U�A�I�$�>�������&rc��t�}|j|�}t�|_ddg|_|jddd��}|j
|d�|jddd��}|j
|d�y)	Nr�r�rqrzadd fr�r�r�r�rTs    r�test_complete_add_groupz'ControllerTests.test_complete_add_groupms|��$�&���]�]�7�+�
�"�*�
��"�E�?�
���$�$�S�!�'�$�:�������(��$�$�S�!�'�$�:�������&rc��t�}|j|�}t�|_ddg|_|jddd��}|j
|d�y)Nr��reloadrmr�zreload r�r�rTs    r�&test_complete_reload_arg_uncompletablez6ControllerTests.test_complete_reload_arg_uncompletablewsV��$�&���]�]�7�+�
�"�*�
��"�H�-�
���$�$�R���$�;�������&rc�r�t�}|j|�}|j|jd�y)Nz*** No help on %s)rrr�nohelprPs   r�test_nohelpzControllerTests.test_nohelps/��$�&���]�]�7�+�
�����*�*�,?�@rc��t�}|j|�}t�|_|j	d�}|jj�}|j
|d�|j
|d�y)Nrm�
foo helped)rrrr^�do_helpr_r�rrrQ�results�helpvals     r�test_do_helpzControllerTests.test_do_help�sf��$�&���]�]�7�+�
�$�J�
���$�$�R�(���#�#�,�,�.������$�'�����,�/rc��t�}|j|�}t�|_|j	d�}|j|d�|jj
�}|jd|v�y)Nr�zhelp		Print a list)rrrr^r�rr_rFr�s     r�test_do_help_for_helpz%ControllerTests.test_do_help_for_help�sh��$�&���]�]�7�+�
�$�J�
���$�$�V�,������$�'��#�#�,�,�.�����.�'�9�:rc��t�}|j|�}|j�}|j�j}|j||�yr)rr�get_supervisor�getServerProxyr\r�rrrQ�proxy�expecteds     r�<test_get_supervisor_returns_serverproxy_supervisor_namespacezLControllerTests.test_get_supervisor_returns_serverproxy_supervisor_namespace�sJ��$�&���]�]�7�+�
��)�)�+���)�)�+�6�6�������)rc��t�}|j|�}|j�}|j�}|j	||�yr)rr�get_server_proxyr�rr�s     r�6test_get_server_proxy_with_no_args_returns_serverproxyzFControllerTests.test_get_server_proxy_with_no_args_returns_serverproxy�sD��$�&���]�]�7�+�
��+�+�-���)�)�+�������)rc��t�}|j|�}|jd�}|j�j}|j||�y)N�system)rrr�r�r�rr�s     r�;test_get_server_proxy_with_namespace_returns_that_namespacezKControllerTests.test_get_server_proxy_with_namespace_returns_that_namespace�sL��$�&���]�]�7�+�
��+�+�H�5���)�)�+�2�2�������)rc���ddlm}g}|�}|jt|j�dkD�g|_|j|t��|j|�y)Nr)�
ClientOptions)�doc)�supervisor.optionsr�rF�len�searchpaths�realize�__doc__r)rr��argsrs    r�#test_real_controller_initializationz3ControllerTests.test_real_controller_initialization�sS��4����/��	
����G�/�/�0�1�4�5� �������'��*��
�
�g�rN)(r=r>r?rrr!rUr`rirur�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r@rrrIrIHs����/�C�
'�
:�2�$	M�]�$Q�$	<�.�(�:�M�'�'�*�'�'�
'�'�'� '�
'�'�
2�'�'�'�'�A�
0�;�*�*�*�
rrIc�$�eZdZd�Zd�Zd�Zd�Zy)�TestControllerPluginBasec��ddlm}|S)Nr)�ControllerPluginBase)rr�)rr�s  rrz(TestControllerPluginBase._getTargetClass�s��A�#�#rc�h�|j�}t�}t|�}||g|��i|��}|Sr�rrr�rrorp�klassrrr�s       rrz!TestControllerPluginBase._makeOne��;���$�$�&��$�&���g�&���s�'�S�'�B�'���
rc�
�|j�}|jd�}|j|d�|j|jjj�d�|jt
|jj�d�|jjd}|j|dd�|j|dg�|j|dd�|j|dd�y)	N�
r�rz%unnamed commands (type help <topic>):r��r��P�rr�rrr^r_r��topics_printed)rr�r'�topicss    r�test_do_help_noargz+TestControllerPluginBase.test_do_help_noarg�s������������%�������&�������*�*�3�3�5�t�<�����V�Z�Z�6�6�7��;����*�*�1�-��������$K�L�������B�'�������B�'�������B�'rc�0�|j�}|jd�}|j|d�|j|jjj�d�|jt
|jj�d�y)N�foozno help on foo
rr�rr�r's   r�test_do_help_withargz-TestControllerPluginBase.test_do_help_witharg�sn�����������&�������&�������*�*�3�3�5�7I�J�����V�Z�Z�6�6�7��;rN)r=r>r?rrr
rr@rrr�r��s��$��
(�<rr�c��eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d �Z"d!�Z#d"�Z$d#�Z%d$�Z&d%�Z'd&�Z(d'�Z)d(�Z*d)�Z+d*�Z,d+�Z-d,�Z.d-�Z/d.�Z0d/�Z1d0�Z2d1�Z3d2�Z4d3�Z5d4�Z6d5�Z7d6�Z8d7�Z9d8�Z:d9�Z;d:�Z<d;�Z=d<�Z>d=�Z?d>�Z@d?�ZAd@�ZBdA�ZCdB�ZDdC�ZEdD�ZFdE�ZGdF�ZHdG�ZIdH�ZJdI�ZKdJ�ZLdK�ZMdL�ZNdM�ZOdN�ZPdO�ZQdP�ZRdQ�ZSdR�ZTdS�ZUdT�ZVdU�ZWdV�ZXdW�ZYdX�ZZdY�Z[dZ�Z\d[�Z]d\�Z^d]�Z_d^�Z`d_�Zad`�Zbda�Zcdb�Zddc�Zedd�Zfde�Zgdf�Zhdg�Zidh�Zjdi�Zkdj�Zldk�Zmdl�Zndm�Zodn�Zpdo�Zqdp�Zrdq�Zsdr�Ztds�Zudt�Zvdu�Zwdv�Zxdw�Zydx�Zzdy�Z{dz�Z|d{�Z}d|�Z~d}�Zd~�Z�d�Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�y�)��TestDefaultControllerPluginc��ddlm}|S)Nr)�DefaultControllerPlugin)rr)rrs  rrz+TestDefaultControllerPlugin._getTargetClass�s��D�&�&rc�h�|j�}t�}t|�}||g|��i|��}|Srr�rs       rrz$TestDefaultControllerPlugin._makeOne�rrc�b�|j�}|jd�}|j|d�|jjj�j
d�}|j|dd�|j|jjtj�y)NrmrrzError: too few arguments�
r�do_tailrrr^r_�splitrsrrt�rr�r'�liness    r�test_tail_toofewargsz0TestDefaultControllerPlugin.test_tail_toofewargs�s������������#�������&��
�
�!�!�*�*�,�2�2�4�8������q��#=�>�������.�.�0C�0K�0K�Lrc�b�|j�}|jd�}|j|d�|jjj�j
d�}|j|dd�|j|jjtj�y)Nzone two three fourrrzError: too many argumentsrrs    r�test_tail_toomanyargsz1TestDefaultControllerPlugin.test_tail_toomanyargs�s����������� 4�5�������&��
�
�!�!�*�*�,�2�2�4�8������q��#>�?�������.�.�0C�0K�0K�Lrc�b�|j�}|jd�}|j|d�|jjj�j
d�}|j|dd�|j|jjtj�y)N�-frrz!Error: tail requires process namerrs    r�test_tail_f_noprocnamez2TestDefaultControllerPlugin.test_tail_f_noprocname�s������������%�������&��
�
�!�!�*�*�,�2�2�4�8������q��#F�G�������.�.�0C�0K�0K�Lrc�b�|j�}|jd�}|j|d�|jjj�j
d�}|j|dd�|j|jjtj�y)Nz-z foorr�Error: bad argument -zrrs    r�test_tail_bad_modifierz2TestDefaultControllerPlugin.test_tail_bad_modifier�s������������)�������&��
�
�!�!�*�*�,�2�2�4�8������q��#;�<�������.�.�0C�0K�0K�Lrc�0�|j�}|jd�}|j|d�|jjj�j
d�}|jt|�d�|j|dd�y)Nrr�r�stdout line�rrrrr^r_rr�rs    r�test_tail_defaultsz.TestDefaultControllerPlugin.test_tail_defaultssv�����������&�������&��
�
�!�!�*�*�,�2�2�4�8������U��R�(�����q��=�1rc��|j�}|jd�}|j|d�|jjj�j
d�}|jt|�d�|j|dd�|j|jjtj�y)N�NO_FILErr�rzNO_FILE: ERROR (no log file)�rrrrr^r_rr�rsrrtrs    r�test_tail_no_filez-TestDefaultControllerPlugin.test_tail_no_files�����������	�*�������&��
�
�!�!�*�*�,�2�2�4�8������U��Q�'�����q��#A�B�������.�.�0C�0K�0K�Lrc��|j�}|jd�}|j|d�|jjj�j
d�}|jt|�d�|j|dd�|j|jjtj�y)Nrnrr�rz)FAILED: ERROR (unknown error reading log)r*rs    r�test_tail_failedz,TestDefaultControllerPlugin.test_tail_faileds������������)�������&��
�
�!�!�*�*�,�2�2�4�8������U��Q�'�����q��#N�O�������.�.�0C�0K�0K�Lrc��|j�}|jd�}|j|d�|jjj�j
d�}|jt|�d�|j|dd�|j|jjtj�y)N�BAD_NAMErr�rz&BAD_NAME: ERROR (no such process name)r*rs    r�test_tail_bad_namez.TestDefaultControllerPlugin.test_tail_bad_name!s�����������
�+�������&��
�
�!�!�*�*�,�2�2�4�8������U��Q�'�����q��#K�L�������.�.�0C�0K�0K�Lrc�0�|j�}|jd�}|j|d�|jjj�j
d�}|jt|�d�|j|dd�y)Nz-10 foorr�rz	dout liner&rs    r�test_tail_bytesmodifierz3TestDefaultControllerPlugin.test_tail_bytesmodifier*sv����������	�*�������&��
�
�!�!�*�*�,�2�2�4�8������U��Q�'�����q��;�/rc�0�|j�}|jd�}|j|d�|jjj�j
d�}|jt|�d�|j|dd�y)Nz
foo stdoutrr$rr%r&rs    r�,test_tail_explicit_channel_stdout_nomodifierzHTestDefaultControllerPlugin.test_tail_explicit_channel_stdout_nomodifier2�v�����������-�������&��
�
�!�!�*�*�,�2�2�4�8������U��R�(�����q��=�1rc�0�|j�}|jd�}|j|d�|jjj�j
d�}|jt|�d�|j|dd�y)Nz
foo stderrrr$rzstderr liner&rs    r�,test_tail_explicit_channel_stderr_nomodifierzHTestDefaultControllerPlugin.test_tail_explicit_channel_stderr_nomodifier:r5rc�Z�|j�}|jd�}|j|d�|jjj�j
�}|j|d�|j|jjtj�y)Nz	foo fudgezError: bad channel 'fudge')
rrrrr^r_�striprsrrt�rr�r'�values    r�'test_tail_explicit_channel_unrecognizedzCTestDefaultControllerPlugin.test_tail_explicit_channel_unrecognizedBs~�����������,�������&��
�
�!�!�*�*�,�2�2�4������ <�=�������.�.�0C�0K�0K�Lrc���|j�}d�|j_g��fd�}||jjjj
_|jd�|j�g�y)Nc��yrr@r@rrrYzFTestDefaultControllerPlugin.test_tail_upcheck_failed.<locals>.<lambda>LrZrc�(���jd�yr3��append�rorp�calleds  �rrqz?TestDefaultControllerPlugin.test_tail_upcheck_failed.<locals>.fN�����M�M�$�rr)	rrrSrr[r\�readProcessStdoutLogrr�rr�rqrCs   @r�test_tail_upcheck_failedz4TestDefaultControllerPlugin.test_tail_upcheck_failedJs^��������*��
�
����	 �EF��
�
���"�"�-�-�B����u�������$rc��|j�}|j�|jjj	�}|jd|v�y)Nz
status <name>)r�help_statusrr^r_rF�rr��outs   r�test_status_helpz,TestDefaultControllerPlugin.test_status_helpTsB������������j�j���(�(�*������3�.�/rc���|j�}d�|j_g��fd�}||jjjj
_|jd�|j�g�y)Nc��yrr@r@rrrYzHTestDefaultControllerPlugin.test_status_upcheck_failed.<locals>.<lambda>\rZrc�(���jd�yr3r@rBs  �rrqzATestDefaultControllerPlugin.test_status_upcheck_failed.<locals>.f^rDrrm)	rrrSrr[r\r��	do_statusrrFs   @r�test_status_upcheck_failedz6TestDefaultControllerPlugin.test_status_upcheck_failedZs`��������*��
�
����	 �BC��
�
���"�"�-�-�?�����������$rc��|j�}|jd�}|j|d�|jjj�j
d�}|j|djd�d�y)Nrmrr�RUNNING�!)rrPrrr^r_r�indexrs    r�*test_status_table_process_column_min_widthzFTestDefaultControllerPlugin.test_status_table_process_column_min_widthdsm��������!�!�"�%�������&��
�
�!�!�*�*�,�2�2�4�8������q����	�2�B�7rc���|j�}|jj}d�}||jj_|j
|jd�d�|jjj�jd�}|j
|djd�d�|j
|djd�d�y)Nc�j�ddlm}ddd|jddddddd	�
d
d
d|jddddddd	�
gS)
Nr��
ProcessStatesږfoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoor�rSrm�foo description�
�name�group�pid�state�	statenamer��stop�spawnerr�now�description�barr$�bar description)�supervisor.statesrZrS�FATAL�rorprZs   rrqzOTestDefaultControllerPlugin.test_status_table_process_column_expands.<locals>.fnsc��7�%�"��+�3�3�"+���!#��#4�	6�"�"��*�0�0�!*��� "��#4���
rrmrrrS�r�)rrrr[r\r�rrPr^r_rrU)rr�rrqrs     r�(test_status_table_process_column_expandszDTestDefaultControllerPlugin.test_status_table_process_column_expandsks���������*�*�$�$��	�089����"�"�4�����)�)�"�-�t�4��
�
�!�!�*�*�,�2�2�4�8������q����	�2�C�8�����q����	�2�C�8rc�"�|j�}|jd�}|j|d�|jjj�j
d�}|j|dj
dd�gd��|j|dj
dd�gd��|j|dj
dd�gd��|j|jjtj�y)	Nrmrrr��rrSr]r��rhrkri�z
baz:baz_01�STOPPEDzbaz description�
rrPrrr^r_rrsrr�r:s    r� test_status_all_processes_no_argz<TestDefaultControllerPlugin.test_status_all_processes_no_arg�s���������!�!�"�%�������&��
�
�!�!�*�*�,�2�2�4�8������q�����a�0�>�	@�����q�����a�0�<�	>�����q�����a�0�E�	G�������.�.�0E�0Q�0Q�Rrc��|j�}|jd�}|j|d�|j|jjt
j�|jjj�jd�}|j|djdd�gd��y)Nrrrr�rp)
rrPrrrsr�SUCCESSr^r_rr:s    r�test_status_successz/TestDefaultControllerPlugin.test_status_success�s���������!�!�%�(�������&�������.�.�0C�0K�0K�L��
�
�!�!�*�*�,�2�2�4�8������q�����a�0�>�	@rc�>�|j�}|jd�}|j|d�|jjj�}|jd|�|j|jjtj�y)N�unknownprogramz(unknownprogram: ERROR (no such process)
)	rrPrrr^r_rsr�UNKNOWNr:s    r�test_status_unknown_processz7TestDefaultControllerPlugin.test_status_unknown_process�sx��������!�!�"2�3�������&��
�
�!�!�*�*�,�����D�e�L�������.�.�0E�0M�0M�Nrc�"�|j�}|jd�}|j|d�|jjj�j
d�}|j|dj
dd�gd��|j|dj
dd�gd��|j|dj
dd�gd��|j|jjtj�y)	N�allrrr�rpr�rqrrrtr:s    r�!test_status_all_processes_all_argz=TestDefaultControllerPlugin.test_status_all_processes_all_arg�s���������!�!�%�(�������&��
�
�!�!�*�*�,�2�2�4�8������q�����a�0�>�	@�����q�����a�0�<�	>�����q�����a�0�E�	G�������.�.�0E�0Q�0Q�Rrc�~�|j�}|jd�}|j|d�|jjj�j
�}|j|jdd�gd��|j|jjtj�y)Nrr�rp)rrPrrr^r_r9rrsrrwr:s    r�test_status_process_namez4TestDefaultControllerPlugin.test_status_process_name�s���������!�!�%�(�������&��
�
�!�!�*�*�,�2�2�4��������T�1�-�>�	@�������.�.�0C�0K�0K�Lrc��|j�}|jd�}|j|d�|jjj�j
d�}|j|dj
dd�gd��|j|jjtj�y)Nzbaz:*rrr�rrrtr:s    r�test_status_group_namez2TestDefaultControllerPlugin.test_status_group_name�s���������!�!�'�*�������&��
�
�!�!�*�*�,�2�2�4�8������q�����a�0�E�	G�������.�.�0E�0Q�0Q�Rrc���|j�}|jd�}|j|d�|jjj�j
d�}|j|dj
dd�gd��|j|dj
dd�gd��|j|jjtj�y)Nz	foo baz:*rrr�rpr�rrrtr:s    r�test_status_mixed_namesz3TestDefaultControllerPlugin.test_status_mixed_names�s���������!�!�+�.�������&��
�
�!�!�*�*�,�2�2�4�8������q�����a�0�>�	@�����q�����a�0�E�	G�������.�.�0E�0Q�0Q�Rrc�b�|j�}|jd�}|j|d�|jjj�j
d�}|j|dd�|j|jjtj�y)Nz
badgroup:*rrzbadgroup: ERROR (no such group)�
rrPrrr^r_rrsrr{r:s    r�test_status_bad_group_namez6TestDefaultControllerPlugin.test_status_bad_group_name�s���������!�!�,�/�������&��
�
�!�!�*�*�,�2�2�4�8������q��#D�E�������.�.�0E�0M�0M�Nrc�b�|j�}|jd�}|j|d�|jjj�j
d�}|j|dd�|j|jjtj�y)N�
badprocessrrz#badprocess: ERROR (no such process)r�r:s    r�test_status_bad_process_namez8TestDefaultControllerPlugin.test_status_bad_process_name�s���������!�!�,�/�������&��
�
�!�!�*�*�,�2�2�4�8������q��#H�I�������.�.�0E�0M�0M�Nrc�b�|j�}|jd�}|j|d�|jjj�j
d�}|j|dd�|j|jjtj�y)Nzbadgroup:badprocessrrz,badgroup:badprocess: ERROR (no such process)r�r:s    r�'test_status_bad_process_name_with_groupzCTestDefaultControllerPlugin.test_status_bad_process_name_with_group�s���������!�!�"7�8�������&��
�
�!�!�*�*�,�2�2�4�8������q��$=�	>�������.�.�0E�0M�0M�Nrc��|j�}|j�|jjj	�}|jd|v�y)Nzstart <name>)r�
help_startrr^r_rFrJs   r�test_start_helpz+TestDefaultControllerPlugin.test_start_help��B������������j�j���(�(�*������#�-�.rc�b�|j�}|jd�}|j|d�d}|j|jjj�j
d�d|�|j|jjtj�y)Nrmz$Error: start requires a process namerr)
r�do_startrrr^r_rrsr�INVALID_ARGS�rr�r'r�s    r�test_start_failz+TestDefaultControllerPlugin.test_start_fail�s������������$�������&�9��������*�*�3�3�5�;�;�D�A�!�D�h�O�������.�.�0C�0P�0P�Qrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y�Nr/�"BAD_NAME: ERROR (no such process)
�	rr�rrr^r_rsrrtr
s   r�test_start_badnamez.TestDefaultControllerPlugin.test_start_badname��s�����������,�������&�������*�*�3�3�5�>�	@�������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)Nr)zNO_FILE: ERROR (no such file)
r�r
s   r�test_start_no_filez.TestDefaultControllerPlugin.test_start_no_filesr�����������+�������&�������*�*�3�3�5�:�	<�������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)N�NOT_EXECUTABLEz/NOT_EXECUTABLE: ERROR (file is not executable)
r�r
s   r�test_start_not_executablez5TestDefaultControllerPlugin.test_start_not_executablest����������!1�2�������&�������*�*�3�3�5�K�	M�������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)N�ALREADY_STARTEDz)ALREADY_STARTED: ERROR (already started)
�	rr�rrr^r_rsrrwr
s   r�test_start_alreadystartedz5TestDefaultControllerPlugin.test_start_alreadystartedst����������!2�3�������&�������*�*�3�3�5�E�	G�������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)N�SPAWN_ERRORz!SPAWN_ERROR: ERROR (spawn error)
�	rr�rrr^r_rsrr�r
s   r�test_start_spawnerrorz1TestDefaultControllerPlugin.test_start_spawnerrorsr�����������/�������&�������*�*�3�3�5�=�	?�������.�.�0C�0O�0O�Prc�>�|j�}|jd�}|j|d�d}|j|jjj�|�|j|jjtj�y)N�ABNORMAL_TERMINATIONz3ABNORMAL_TERMINATION: ERROR (abnormal termination)
r�r�s    r�test_start_abnormalterminationz:TestDefaultControllerPlugin.test_start_abnormaltermination$su����������!7�8�������&�I��������*�*�3�3�5�x�@�������.�.�0C�0O�0O�Prc���|j�}|jd�}|j|d�|j|jjj�d�y)Nr�
foo: started
)rr�rrr^r_r
s   r�test_start_one_successz2TestDefaultControllerPlugin.test_start_one_success,sQ�����������'�������&�������*�*�3�3�5�)�	+rc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)N�foo:foor�r�r
s   r�&test_start_one_with_group_name_successzBTestDefaultControllerPlugin.test_start_one_with_group_name_success3�r�����������+�������&�������*�*�3�3�5�)�	+�������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)N�foo barzfoo: started
bar: started
r�r
s   r�test_start_manyz+TestDefaultControllerPlugin.test_start_many;�r�����������+�������&�������*�*�3�3�5�7�	9�������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)Nr�z(foo:foo_00: started
foo:foo_01: started
r�r
s   r�test_start_groupz,TestDefaultControllerPlugin.test_start_groupCsv�����������(�������&�������*�*�3�3�5�1�	2�	
������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y�Nz	BAD_NAME:� BAD_NAME: ERROR (no such group)
)	rr�rrr^r_rsrr�r
s   r�test_start_group_bad_namez5TestDefaultControllerPlugin.test_start_group_bad_nameMsr�����������-�������&�������*�*�3�3�5�<�	>�������.�.�0C�0P�0P�Qrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)Nr~zDfoo: started
foo2: started
failed_group:failed: ERROR (spawn error)
r�r
s   r�test_start_allz*TestDefaultControllerPlugin.test_start_allUsx�����������'�������&�������*�*�3�3�5�F�	G�	
������.�.�0C�0O�0O�Prc���|j�}d�|j_g��fd�}|jjjj
}||_||_|jd�|j�g�y)Nc��yrr@r@rrrYzGTestDefaultControllerPlugin.test_start_upcheck_failed.<locals>.<lambda>brZrc�(���jd�yr3r@rBs  �rrqz@TestDefaultControllerPlugin.test_start_upcheck_failed.<locals>.fdrDrr)
rrrSrr[r\�startAllProcesses�startProcessGroupr�r�rr�rqr\rCs    @r�test_start_upcheck_failedz5TestDefaultControllerPlugin.test_start_upcheck_failed`sk��������*��
�
����	 ��Z�Z�'�'�/�/�:�:�
�'(�
�$�'(�
�$�����������$rc��|j�}|j�|jjj	�}|jd|v�y)Nzstop <name>)r�	help_stoprr^r_rFrJs   r�test_stop_helpz*TestDefaultControllerPlugin.test_stop_helplsB������������j�j���(�(�*�����
��,�-rc�^�|j�}|jd�}|j|d�|j|jjj�j
d�dd�|j|jjtj�y)Nrmrrz#Error: stop requires a process name)
r�do_stoprrr^r_rrsrrtr
s   r�test_stop_failz*TestDefaultControllerPlugin.test_stop_failrs������������#�������&�������*�*�3�3�5�;�;�D�A�!�D�>�	@�������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�yr��	rr�rrr^r_rsrrtr
s   r�test_stop_badnamez-TestDefaultControllerPlugin.test_stop_badnamezss����������
�+�������&�������*�*�3�3�5�>�	@�������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)Nr��!NOT_RUNNING: ERROR (not running)
�	rr�rrr^r_rsrrwr
s   r�test_stop_notrunningz0TestDefaultControllerPlugin.test_stop_notrunning�sr����������
�.�������&�������*�*�3�3�5�=�	?�������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)Nrn�FAILED
r�r
s   r�test_stop_failedz,TestDefaultControllerPlugin.test_stop_failed�so�����������)�������&�������*�*�3�3�5�z�B�������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)Nr�
foo: stopped
r�r
s   r�test_stop_one_successz1TestDefaultControllerPlugin.test_stop_one_success�sr�����������&�������&�������*�*�3�3�5�)�	+�������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)Nr�r�r�r
s   r�%test_stop_one_with_group_name_successzATestDefaultControllerPlugin.test_stop_one_with_group_name_success�sr����������	�*�������&�������*�*�3�3�5�)�	+�������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)Nr�zfoo: stopped
bar: stopped
r�r
s   r�test_stop_manyz*TestDefaultControllerPlugin.test_stop_many�sv����������	�*�������&�������*�*�3�3�5�*�	+�	
������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)Nr�z(foo:foo_00: stopped
foo:foo_01: stopped
r�r
s   r�test_stop_groupz+TestDefaultControllerPlugin.test_stop_group�sv�����������'�������&�������*�*�3�3�5�1�	2�	
������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�yr�r�r
s   r�test_stop_group_bad_namez4TestDefaultControllerPlugin.test_stop_group_bad_name�sr�����������,�������&�������*�*�3�3�5�<�	>�������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)Nr~zHfoo: stopped
foo2: stopped
failed_group:failed: ERROR (no such process)
r�r
s   r�
test_stop_allz)TestDefaultControllerPlugin.test_stop_all�sx�����������&�������&�������*�*�3�3�5�J�	K�	
������.�.�0C�0K�0K�Lrc���|j�}d�|j_g��fd�}|jjjj
}||_||_|jd�|j�g�y)Nc��yrr@r@rrrYzFTestDefaultControllerPlugin.test_stop_upcheck_failed.<locals>.<lambda>�rZrc�(���jd�yr3r@rBs  �rrqz?TestDefaultControllerPlugin.test_stop_upcheck_failed.<locals>.f�rDrr)
rrrSrr[r\�stopAllProcesses�stopProcessGroupr�rr�s    @r�test_stop_upcheck_failedz4TestDefaultControllerPlugin.test_stop_upcheck_failed�sk��������*��
�
����	 ��Z�Z�'�'�/�/�:�:�
�&'�
�#�&'�
�#����u�������$rc��|j�}|j�|jjj	�}|jd|v�y)Nzsignal <signal name> <name>)r�help_signalrr^r_rFrJs   r�test_signal_helpz,TestDefaultControllerPlugin.test_signal_help�sC������������j�j���(�(�*�����5��<�=rc�b�|j�}|jd�}|j|d�d}|j|jjj�j
d�d|�|j|jjtj�y)Nrm�7Error: signal requires a signal name and a process namerr�
r�	do_signalrrr^r_rrsrrt�rr�r'�msgs    r�test_signal_fail_no_argz3TestDefaultControllerPlugin.test_signal_fail_no_arg�s���������!�!�"�%�������&�G��������*�*�3�3�5�;�;�D�A�!�D�c�J�������.�.�0C�0K�0K�Lrc�b�|j�}|jd�}|j|d�d}|j|jjj�j
d�d|�|j|jjtj�y)N�hupr�rrr�r�s    r�test_signal_fail_one_argz4TestDefaultControllerPlugin.test_signal_fail_one_arg�s���������!�!�%�(�������&�G��������*�*�3�3�5�;�;�D�A�!�D�c�J�������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)NzBAD_SIGNAL foozfoo: ERROR (bad signal name)
�	rr�rrr^r_rsrrtr
s   r�test_signal_bad_signalz2TestDefaultControllerPlugin.test_signal_bad_signal�su��������!�!�"2�3�������&�������*�*�3�3�5�9�	;�������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)NzHUP BAD_NAMEr�r�r
s   r�test_signal_bad_namez0TestDefaultControllerPlugin.test_signal_bad_name�su��������!�!�.�1�������&�������*�*�3�3�5�>�	@�������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)Nz
HUP BAD_NAME:r�r�r
s   r�test_signal_bad_groupz1TestDefaultControllerPlugin.test_signal_bad_group�st��������!�!�/�2�������&�������*�*�3�3�5�<�	>�������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)NzHUP NOT_RUNNINGr�)	rr�rrr^r_rsrr�r
s   r�test_signal_not_runningz3TestDefaultControllerPlugin.test_signal_not_running�su��������!�!�"3�4�������&�������*�*�3�3�5�=�	?�������.�.�0C�0O�0O�Prc��|j�}|jd�}|j|d�|j|jjj�d�|j|jjd�y)Nz
HUP FAILEDr�r�)rr�rrr^r_rsr
s   r�test_signal_failedz.TestDefaultControllerPlugin.test_signal_failedsj��������!�!�,�/�������&�������*�*�3�3�5�z�B�������.�.��2rc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)NzHUP foozfoo: signalled
�	rr�rrr^r_rsrrwr
s   r�test_signal_one_successz3TestDefaultControllerPlugin.test_signal_one_successsr��������!�!�)�,�������&�������*�*�3�3�5�7I�J�������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)NzHUP foo barzfoo: signalled
bar: signalled
rr
s   r�test_signal_manyz,TestDefaultControllerPlugin.test_signal_manysx��������!�!�-�0�������&�������*�*�3�3�5�,�	-�	
������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)NzHUP foo:z,foo:foo_00: signalled
foo:foo_01: signalled
rr
s   r�test_signal_groupz-TestDefaultControllerPlugin.test_signal_groupsx��������!�!�*�-�������&�������*�*�3�3�5�3�	4�	
������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)NzHUP allzLfoo: signalled
foo2: signalled
failed_group:failed: ERROR (no such process)
r�r
s   r�test_signal_allz+TestDefaultControllerPlugin.test_signal_all'sz��������!�!�)�,�������&�������*�*�3�3�5�J�	K�	
������.�.�0C�0K�0K�Lrc���|j�}d�|j_g��fd�}|jjjj
}||_||_|jd�|j�g�y)Nc��yrr@r@rrrYzHTestDefaultControllerPlugin.test_signal_upcheck_failed.<locals>.<lambda>3rZrc�(���jd�yr3r@rBs  �rrqzATestDefaultControllerPlugin.test_signal_upcheck_failed.<locals>.f5rDrzterm foo)
rrrSrr[r\�signalAllProcesses�signalProcessGroupr�rr�s    @r�test_signal_upcheck_failedz6TestDefaultControllerPlugin.test_signal_upcheck_failed1sm��������*��
�
����	 ��Z�Z�'�'�/�/�:�:�
�()�
�%�()�
�%�����$������$rc��|j�}|j�|jjj	�}|jd|v�y)Nzrestart <name>)r�help_restartrr^r_rFrJs   r�test_restart_helpz-TestDefaultControllerPlugin.test_restart_help=sC������������j�j���(�(�*�����(�C�/�0rc�^�|j�}|jd�}|j|d�|j|jjj�j
d�dd�|j|jjtj�y)Nrmrrz&Error: restart requires a process name)
r�
do_restartrrr^r_rrsrrtr
s   r�test_restart_failz-TestDefaultControllerPlugin.test_restart_failCs���������"�"�2�&�������&�������*�*�3�3�5�;�;�D�A�!�D�A�	C�������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)Nrzfoo: stopped
foo: started
)	rrrrr^r_rsrrwr
s   r�test_restart_onez,TestDefaultControllerPlugin.test_restart_oneKst��������"�"�5�)�������&�������*�*�3�3�5�7�	9�������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)Nr~z�foo: stopped
foo2: stopped
failed_group:failed: ERROR (no such process)
foo: started
foo2: started
failed_group:failed: ERROR (spawn error)
)	rrrrr^r_rsrr�r
s   r�test_restart_allz,TestDefaultControllerPlugin.test_restart_allSsz��������"�"�5�)�������&�������*�*�3�3�5�F�	G�
	
������.�.�0C�0O�0O�Prc���|j�}d�|j_g��fd�}|jjjj
}||_||_|jd�|j�g�y)Nc��yrr@r@rrrYzITestDefaultControllerPlugin.test_restart_upcheck_failed.<locals>.<lambda>`rZrc�(���jd�yr3r@rBs  �rrqzBTestDefaultControllerPlugin.test_restart_upcheck_failed.<locals>.fbrDrr)
rrrSrr[r\r�r�rrr�s    @r�test_restart_upcheck_failedz7TestDefaultControllerPlugin.test_restart_upcheck_failed^sm��������*��
�
����	 ��Z�Z�'�'�/�/�:�:�
�&'�
�#�&'�
�#����%� ������$rc��|j�}|j�|jjj	�}|jd|v�y)Nzclear <name>)r�
help_clearrr^r_rFrJs   r�test_clear_helpz+TestDefaultControllerPlugin.test_clear_helpjr�rc�^�|j�}|jd�}|j|d�|j|jjj�j
d�dd�|j|jjtj�y)Nrmrrz$Error: clear requires a process name)
r�do_clearrrr^r_rrsrrtr
s   r�test_clear_failz+TestDefaultControllerPlugin.test_clear_failps������������$�������&�������*�*�3�3�5�;�;�D�A�!�D�?�	A�������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�yr��	rr#rrr^r_rsrrtr
s   r�test_clear_badnamez.TestDefaultControllerPlugin.test_clear_badnamexr�rc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)Nr�
foo: cleared
�	rr#rrr^r_rsrrwr
s   r�test_clear_one_successz2TestDefaultControllerPlugin.test_clear_one_success�sr�����������'�������&�������*�*�3�3�5�)�	+�������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)Nr�r)r*r
s   r�!test_clear_one_with_group_successz=TestDefaultControllerPlugin.test_clear_one_with_group_success�r�rc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)Nr�zfoo: cleared
bar: cleared
r*r
s   r�test_clear_manyz+TestDefaultControllerPlugin.test_clear_many�r�rc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)Nr~z?foo: cleared
foo2: cleared
failed_group:failed: ERROR (failed)
r&r
s   r�test_clear_allz*TestDefaultControllerPlugin.test_clear_all�sx�����������'�������&�������*�*�3�3�5�A�	B�	
������.�.�0C�0K�0K�Lrc���|j�}d�|j_g��fd�}|jjjj
}||_||_|jd�|j�g�y)Nc��yrr@r@rrrYzGTestDefaultControllerPlugin.test_clear_upcheck_failed.<locals>.<lambda>�rZrc�(���jd�yr3r@rBs  �rrqz@TestDefaultControllerPlugin.test_clear_upcheck_failed.<locals>.f�rDrr)
rrrSrr[r\�clearAllProcessLogs�clearProcessLogsr#rr�s    @r�test_clear_upcheck_failedz5TestDefaultControllerPlugin.test_clear_upcheck_failed�sk��������*��
�
����	 ��Z�Z�'�'�/�/�:�:�
�)*�
�&�&'�
�#�����������$rc��|j�}|j�|jjj	�}|jd|v�y)Nz
open <url>)r�	help_openrr^r_rFrJs   r�test_open_helpz*TestDefaultControllerPlugin.test_open_help�sB������������j�j���(�(�*�������+�,rc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)N�badnamez&ERROR: url must be http:// or unix://
)	r�do_openrrr^r_rsrrtr
s   r�test_open_failz*TestDefaultControllerPlugin.test_open_fail�ss����������	�*�������&�������*�*�3�3�5�B�	D�������.�.�0C�0K�0K�Lrc�"�|j�}|jd�}|j|d�|jjj�j
d�}|j|dj
dd�gd��|j|dj
dd�gd��|j|dj
dd�gd��|j|jjtj�y)	Nzhttp://localhost:9002rrr�rpr�rqrr)
rr=rrr^r_rrsrrwr:s    r�test_open_succeedz-TestDefaultControllerPlugin.test_open_succeed�s����������� 7�8�������&��
�
�!�!�*�*�,�2�2�4�8������q�����a�0�>�	@�����q�����a�0�<�	>�����q�����a�0�E�	G�������.�.�0C�0K�0K�Lrc��|j�}|j�|jjj	�}|jd|v�y)Nz*Show the version of the remote supervisord)r�help_versionrr^r_rFrJs   r�test_version_helpz-TestDefaultControllerPlugin.test_version_help�sC������������j�j���(�(�*�����D��K�Lrc��|j�}|jd�|j|jjj�d�y)Nz3000
)r�
do_versionrrr^r_�rr�s  r�test_versionz(TestDefaultControllerPlugin.test_version�s>����������$��������*�*�3�3�5�x�@rc�\�|j�}|jd�}|j|d�|jjj�}|j
|jd�|�|j|jjtj�y)Nr�z#Error: version accepts no arguments)rrErrr^r_rF�
startswithrsrrt�rr�r'�vals    r�test_version_argz,TestDefaultControllerPlugin.test_version_arg�s~��������"�"�5�)�������&��j�j���(�(�*��������'L�M�s�S�������.�.�0C�0K�0K�Lrc���|j�}d�|j_g��fd�}||jjjj
_|jd�|j�g�y)Nc��yrr@r@rrrYzITestDefaultControllerPlugin.test_version_upcheck_failed.<locals>.<lambda>�rZrc�(���jd�yr3r@rBs  �rrqzBTestDefaultControllerPlugin.test_version_upcheck_failed.<locals>.f�rDrrm)	rrrSrr[r\�getSupervisorVersionrErrFs   @r�test_version_upcheck_failedz7TestDefaultControllerPlugin.test_version_upcheck_failed�s`��������*��
�
����	 �EF��
�
���"�"�-�-�B����"�������$rc��|j�}|j�|jjj	�}|jd|v�y)NzRestart the remote supervisord)r�help_reloadrr^r_rFrJs   r�test_reload_helpz,TestDefaultControllerPlugin.test_reload_help�sC������������j�j���(�(�*�����8�C�?�@rc�,�|j�}|jj}d|jj_|j
d�}|j|d�|j|jjjd�y)NFrm)	rrrr[r\�_restartable�	do_reloadr�
_restarted�rr�rr's    r�test_reload_failz,TestDefaultControllerPlugin.test_reload_fail�sn��������*�*�$�$��27����"�"�/��!�!�"�%�������&�������3�3�>�>��Frc��|j�}|jj}|jd�}|j	|d�|j	|j
jjd�y�NrmT)rrrrWrr[r\rXrYs    r�test_reloadz'TestDefaultControllerPlugin.test_reload�s\��������*�*�$�$���!�!�"�%�������&�������3�3�>�>��Erc�\�|j�}|jd�}|j|d�|jjj�}|j
|jd�|�|j|jjtj�y)Nr�z"Error: reload accepts no arguments)rrWrrr^r_rFrIrsrrtrJs    r�test_reload_argz+TestDefaultControllerPlugin.test_reload_arg��~��������!�!�%�(�������&��j�j���(�(�*��������'K�L�c�R�������.�.�0C�0K�0K�Lrc��|j�}|j�|jjj	�}|jd|v�y)Nz Shut the remote supervisord down)r�
help_shutdownrr^r_rFrJs   r�test_shutdown_helpz.TestDefaultControllerPlugin.test_shutdown_help�C������������j�j���(�(�*�����:�c�A�Brc���|j�}|jj}|jd�}|j	|d�|j	|j
jjd�|jjj�}|j|jd�|�|j	|jjtj�y)Nr�Fz$Error: shutdown accepts no arguments)rrr�do_shutdownrr[r\�	_shutdownr^r_rFrIrsrrt)rr�rr'rKs     r�"test_shutdown_with_arg_shows_errorz>TestDefaultControllerPlugin.test_shutdown_with_arg_shows_error
s���������*�*�$�$���#�#�E�*�������&�������3�3�=�=�u�E��j�j���(�(�*��������'M�N�PS�T�������.�.�0C�0K�0K�Lrc��|j�}|jj}|jd�}|j	|d�|j	|j
jjd�yr\)rrrrfrr[r\rgrYs    r�
test_shutdownz)TestDefaultControllerPlugin.test_shutdowns\��������*�*�$�$���#�#�B�'�������&�������3�3�=�=�t�Drc���|j�}ddlm��fd�}||jjj
j_|jd�}|j|d�|j|jjj�d�|j|jjtj�y)Nrrc�X��tj�jjd��)N�bye�rrfrc�SHUTDOWN_STATE�rorprs  �rrzbTestDefaultControllerPlugin.test_shutdown_catches_xmlrpc_fault_shutdown_state.<locals>.raise_faults����/�/�&�-�-�">�">��F�FrrmzERROR: already shutting down
)rr\rrrr[�shutdownrfrr^r_rsrrw)rr�rr'rs    @r�1test_shutdown_catches_xmlrpc_fault_shutdown_statezMTestDefaultControllerPlugin.test_shutdown_catches_xmlrpc_fault_shutdown_states���������%�	G�9D��
�
���"�"�-�-�6��#�#�B�'�������&�������*�*�3�3�5�9�	;�������.�.�0C�0K�0K�Lrc�X��|j�}ddlm��fd�}||jjj
j_|jtj|jd�|j|jjtj�y)Nrrc�X��tj�jjd��)N�ouch�rrfrc�CANT_REREADrps  �rrz[TestDefaultControllerPlugin.test_shutdown_reraises_other_xmlrpc_faults.<locals>.raise_fault-�����/�/�&�-�-�";�";�V�D�Drrm)rr\rrrr[rqrrrrfrfrrsrrt)rr�rrs   @r�*test_shutdown_reraises_other_xmlrpc_faultszFTestDefaultControllerPlugin.test_shutdown_reraises_other_xmlrpc_faults)su��������%�	E�9D��
�
���"�"�-�-�6����)�/�/� �,�,�b�	2�������.�.�0C�0K�0K�Lrc����|j�}ddl�ddl���fd�}||jjj
j_|jd�}|j|d�|jjj�}|jd|v�|j|jjtj�y)Nrc�<���j�jd��rxryr|s  ��rrz`TestDefaultControllerPlugin.test_shutdown_catches_socket_error_ECONNREFUSED.<locals>.raise_fault:r�rrmz'refused connection (already shut down?)�rr~r}rrr[r\rqrfrr^r_rFrsrrt�rr�rr'r�r}r~s     @@r�/test_shutdown_catches_socket_error_ECONNREFUSEDzKTestDefaultControllerPlugin.test_shutdown_catches_socket_error_ECONNREFUSED5s�����������	B�9D��
�
���"�"�-�-�6��#�#�B�'�������&����"�"�+�+�-�����A�V�K�L�������.�.�0C�0K�0K�Lrc����|j�}ddl�ddl���fd�}||jjj
j_|jd�}|j|d�|jjj�}|jd|v�|j|jjtj�y)Nrc�<���j�jd��)Nzno filer�r|s  ��rrzZTestDefaultControllerPlugin.test_shutdown_catches_socket_error_ENOENT.<locals>.raise_faultJs����,�,�u�|�|�Y�7�7rrmz!no such file (already shut down?)r|r}s     @@r�)test_shutdown_catches_socket_error_ENOENTzETestDefaultControllerPlugin.test_shutdown_catches_socket_error_ENOENTEs�����������	8�9D��
�
���"�"�-�-�6��#�#�B�'�������&����"�"�+�+�-�����;�v�E�F�������.�.�0C�0K�0K�Lrc�X���|j�}ddl�ddl���fd�}||jjj
j_|j�j|jd�|j|jjtj�y)Nrc�<���j�jd��)N�denied)rz�EPERMr|s  ��rrz[TestDefaultControllerPlugin.test_shutdown_reraises_other_socket_errors.<locals>.raise_faultZs����,�,�u�{�{�H�5�5rrm)rr~r}rrr[r\rqrrrzrfrrsrrt)rr�rr}r~s   @@r�*test_shutdown_reraises_other_socket_errorszFTestDefaultControllerPlugin.test_shutdown_reraises_other_socket_errorsUsw����������	6�9D��
�
���"�"�-�-�6����&�,�,� �,�,�b�	2�������.�.�0C�0K�0K�Lrc�z�|j�}|jdgdgdgg�|jgggg�y)N�added�changed�removed)r�_formatChangesrFs  r�test__formatChangesz/TestDefaultControllerPlugin.test__formatChangesbs<�����������y�9�+�	�{�C�D����r�2�r�l�+rc��|j�}|j�|jjj	�}|jd|v�|j
|jjtj�y)Nz'Reload the daemon's configuration files)
r�help_rereadrr^r_rFrrsrrwrJs   r�test_reread_helpz,TestDefaultControllerPlugin.test_reread_helphsd������������j�j���(�(�*�����A�S�H�I�������.�.�0C�0K�0K�Lrc�"��|j�}g��fd�|_|jd�}|j|d�|j�ddgdgdgg�|j|jj
tj�y)Nc�&���j|�Srr@�rX�callss �rrYz9TestDefaultControllerPlugin.test_reread.<locals>.<lambda>rs���%�,�,�q�/�rrr�r�r�)rr��	do_rereadrrrsrrw)rr�r'r�s   @r�test_rereadz'TestDefaultControllerPlugin.test_rereados}���������� 9����!�!�$�'�������&�����q��W�I�	�{�Y�K�#H�I�������.�.�0C�0K�0K�Lrc�\�|j�}|jd�}|j|d�|jjj�}|j
|jd�|�|j|jjtj�y)Nr�z"Error: reread accepts no arguments)rr�rrr^r_rFrIrsrrtrJs    r�test_reread_argz+TestDefaultControllerPlugin.test_reread_argxr`rc���|j�}ddlm��fd�}||jjj
j_|jd�|j|jjj�d�|j|jjtj�y)Nrrc�X��tj�jjd��)N�cantrvrps  �r�reloadConfigzITestDefaultControllerPlugin.test_reread_cant_reread.<locals>.reloadConfig�rxrzERROR: cant
�rr\rrrr[r�r�rr^r_rsrrt�rr�r�rs   @r�test_reread_cant_rereadz3TestDefaultControllerPlugin.test_reread_cant_reread�s���������%�	E�=I��
�
���"�"�-�-�:������������*�*�3�3�5�(�	*�������.�.�0C�0K�0K�Lrc���|j�}ddlm��fd�}||jjj
j_|jd�|j|jjj�d�|j|jjtj�y)Nrrc�X��tj�jjd��rlrnrps  �rr�zLTestDefaultControllerPlugin.test_reread_shutdown_state.<locals>.reloadConfig�s����/�/�&�-�-�">�">��C�Cr� ERROR: supervisor shutting down
r�r�s   @r�test_reread_shutdown_statez6TestDefaultControllerPlugin.test_reread_shutdown_state�s���������%�	D�=I��
�
���"�"�-�-�:������������*�*�3�3�5�<�	>�������.�.�0C�0K�0K�Lrc�X��|j�}ddlm��fd�}||jjj
j_|jtj|jd�|j|jjtj�y)Nrrc�X��tj�jjd��rl)rrfrcrnrps  �rr�zSTestDefaultControllerPlugin.test_reread_reraises_other_faults.<locals>.reloadConfig�s����/�/�&�-�-�"6�"6��;�;rrm)rr\rrrr[r�rrrrfr�rrsrrtr�s   @r�!test_reread_reraises_other_faultsz=TestDefaultControllerPlugin.test_reread_reraises_other_faults�sq��������%�	<�=I��
�
���"�"�-�-�:����)�/�/�6�+;�+;�R�@�������.�.�0C�0K�0K�Lrc���ddddddd�}|j�}|j|�}|jd|v�ddddddd�}|j|�}|jd|v�y)	N�group1�process1T���r`r_�inuse�	autostart�process_prio�
group_priozin useF�avail)r�_formatConfigInforF)r�infor�r's    r�test__formatConfigInfoz2TestDefaultControllerPlugin.test__formatConfigInfo�s���"�#��"�!$�"�%��������)�)�$�/������F�*�+�"�#��#�!$�"�%���)�)�$�/������6�)�*rc��|j�}|j�|jjj	�}|jd|v�y)NzDisplay all configured)r�
help_availrr^r_rFrJs   r�test_avail_helpz+TestDefaultControllerPlugin.test_avail_help�sC������������j�j���(�(�*�����0�C�7�8rc����g}|j�}Gd�dt���fd�|j_|j|j_|j
d�}|j|d�y)Nc��eZdZd�Zy)�>TestDefaultControllerPlugin.test_avail.<locals>.FakeSupervisorc��ddddddd�gS)Nr�r�Fr�r�r@r;s r�getAllConfigInfozOTestDefaultControllerPlugin.test_avail.<locals>.FakeSupervisor.getAllConfigInfo�s#��#+�Z�#(�u�*-�S�C�D�DrN)r=r>r?r�r@rr�FakeSupervisorr��s��
Drr�c�����Srr@)r�s�rrYz8TestDefaultControllerPlugin.test_avail.<locals>.<lambda>�s
���^�-=�rrm)rrBrr�rAr��do_availr)rr�r�r'r�s    @r�
test_availz&TestDefaultControllerPlugin.test_avail�s]����������	D�V�	D�%>��
�
�!�!�L�L��
�
������$�������&rc�\�|j�}|jd�}|j|d�|jjj�}|j
|jd�|�|j|jjtj�y)Nr�z!Error: avail accepts no arguments)rr�rrr^r_rFrIrsrrtrJs    r�test_avail_argz*TestDefaultControllerPlugin.test_avail_arg�s|�����������'�������&��j�j���(�(�*��������'J�K�S�Q�������.�.�0C�0K�0K�Lrc��|j�}|jjjj}d�}||_|j
d�}|j|d�|j|jjj�d�|j|jjtj�y)Nc�b�ddlm}tj|jj
d���Nrrrm�r\rrrfrcrors rr�zOTestDefaultControllerPlugin.test_avail_shutdown_state.<locals>.getAllConfigInfo�s ��)��/�/�&�-�-�">�">��C�Crrmr�)
rrrr[r\r�r�rr^r_rsrrt)rr�r\r�r's     r�test_avail_shutdown_statez5TestDefaultControllerPlugin.test_avail_shutdown_state�s���������Z�Z�'�'�/�/�:�:�
�	D�'7�
�#�����$�������&�������*�*�3�3�5�<�	>�������.�.�0C�0K�0K�Lrc�J�|j�}|jjjj}d�}||_|j
tj|jd�|j|jjtj�y)Nc�b�ddlm}tj|jj
d��r��r\rrrfrcrnrs rr�zVTestDefaultControllerPlugin.test_avail_reraises_other_faults.<locals>.getAllConfigInfo�s ��)��/�/�&�-�-�"6�"6��;�;rrm)rrrr[r\r�rrrrfr�rrsrrt)rr�r\r�s    r� test_avail_reraises_other_faultsz<TestDefaultControllerPlugin.test_avail_reraises_other_faults�sr��������Z�Z�'�'�/�/�:�:�
�	<�'7�
�#����)�/�/�6�?�?�B�?�������.�.�0C�0K�0K�Lrc��|j�}|j�|jjj	�}|jd|v�y)Nz
add <name>)r�help_addrr^r_rFrJs   r�
test_add_helpz)TestDefaultControllerPlugin.test_add_help��@������������j�j���(�(�*�������+�,rc�`�|j�}|jd�}|j|d�|jjj
j}|j|jdg�|j|jjtj�y�Nr)r�do_addrrrr[r\�	processesrsrrw)rr�r'r\s    r�test_addz$TestDefaultControllerPlugin.test_add�s����������u�%�������&��Z�Z�'�'�/�/�:�:�
�����-�-��w�7�������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)N�
ALREADY_ADDEDz$ERROR: process group already active
)	rr�rrr^r_rsrrwr
s   r�test_add_already_addedz2TestDefaultControllerPlugin.test_add_already_added�ss�����������/�������&�������*�*�3�3�5�@�	B�������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)Nr/�'ERROR: no such process/group: BAD_NAME
�	rr�rrr^r_rsrrtr
s   r�test_add_bad_namez-TestDefaultControllerPlugin.test_add_bad_namess����������z�*�������&�������*�*�3�3�5�C�	E�������.�.�0C�0K�0K�Lrc�:�|j�}|jd�}|j|d�|j|jjj�d�|j|jjtj�y)NrozERROR: shutting down
r�r
s   r�test_add_shutdown_statez3TestDefaultControllerPlugin.test_add_shutdown_statess����������/�0�������&�������*�*�3�3�5�1�	3�������.�.�0C�0K�0K�Lrc���|j�}|jtj|jd�|j|jjtj�y�Nrn)
rrrrrfr�rrrsrrtrFs  r�test_add_reraises_other_faultsz:TestDefaultControllerPlugin.test_add_reraises_other_faultssH����������)�/�/�6�=�=�(�C�������.�.�0C�0K�0K�Lrc��|j�}|j�|jjj	�}|jd|v�|j
|jjtj�y)Nz
remove <name>)
r�help_removerr^r_rFrrsrrwrJs   r�test_remove_helpz,TestDefaultControllerPlugin.test_remove_helpsc������������j�j���(�(�*������3�.�/�������.�.�0C�0K�0K�Lrc��|j�}|jjjj}dg|_|j
d�}|j|d�|j|j
g�yr�)rrrr[r\r��	do_remover�rr�r\r's    r�test_removez'TestDefaultControllerPlugin.test_removesh��������Z�Z�'�'�/�/�:�:�
� %�w�
���!�!�%�(�������&�����-�-�r�2rc��|j�}|jjjj}dg|_|j
d�}|j|d�|j|jjj�d�|j|jjtj�y)Nrr/r��
rrrr[r\r�r�rr^r_rsrrtr�s    r�test_remove_bad_namez0TestDefaultControllerPlugin.test_remove_bad_name$s���������Z�Z�'�'�/�/�:�:�
� %�w�
���!�!�*�-�������&�������*�*�3�3�5�C�	E�������.�.�0C�0K�0K�Lrc��|j�}|jjjj}dg|_|j
d�}|j|d�|j|jjj�d�|j|jjtj�y)Nr�
STILL_RUNNINGz2ERROR: process/group still running: STILL_RUNNING
r�r�s    r�test_remove_still_runningz5TestDefaultControllerPlugin.test_remove_still_running.s���������Z�Z�'�'�/�/�:�:�
� %�w�
���!�!�/�2�������&�������*�*�3�3�5�N�	P�������.�.�0C�0K�0K�Lrc���|j�}|jtj|jd�|j|jjtj�yr�)
rrrrrfr�rrrsrrtrFs  r�!test_remove_reraises_other_faultsz=TestDefaultControllerPlugin.test_remove_reraises_other_faults8sJ����������)�/�/�6�+;�+;�X�F�������.�.�0C�0K�0K�Lrc��|j�}|j�|jjj	�}|jd|v�y)NzReload config and add/remove)r�help_updaterr^r_rFrJs   r�test_update_helpz,TestDefaultControllerPlugin.test_update_help=sC������������j�j���(�(�*�����6�#�=�>rc��|j�}|jjjj}d�}||_dg|_|jd�|j|jdg�y)Nc�b�ddlm}tj|jj
d��)Nrr�blahr�rs rr�zMTestDefaultControllerPlugin.test_update_not_on_shutdown.<locals>.reloadConfigFs ��)��/�/�&�-�-�">�">��G�Grr�rm)	rrrr[r\r�r��	do_updater�rr�r\r�s    r�test_update_not_on_shutdownz7TestDefaultControllerPlugin.test_update_not_on_shutdownCsh��������Z�Z�'�'�/�/�:�:�
�	H�#/�
�� )�{�
�����������-�-�	�{�;rc��|j�}|jjjj}d�}||_|j
d�}|j|d�|j|jdg�y)Nc��dgggggS)N�new_procr@r@rrr�zITestDefaultControllerPlugin.test_update_added_procs.<locals>.reloadConfigRs�� �\�2�r�*�+�+rrmr�)	rrrr[r\r�r�rr�)rr�r\r�r's     r�test_update_added_procsz3TestDefaultControllerPlugin.test_update_added_procsNsm��������Z�Z�'�'�/�/�:�:�
�	,�".�
���!�!�"�%�������&�����-�-�
�|�<rc�L�|j�}|jjjj}d�}||_ddg|_|jd�|jt|j�tddg��|jd�|jt|j�tgd���|jd�|jt|j�tgd���ddg|_|jd�|jt|j�tddg��ddg|_|jd	�|jt|j�tgd���y)
Nc��ddgdgdgggS)N�added1�added2r�r�r@r@rrr�zHTestDefaultControllerPlugin.test_update_with_gname.<locals>.reloadConfig^s����)�I�;���D�E�Err�r�z
added1 added2)r�r�r�r�)r�r�r�zremoved added1r�r~)
rrrr[r\r�r�r�r�sortedr�s    r�test_update_with_gnamez2TestDefaultControllerPlugin.test_update_with_gnameZsk��������Z�Z�'�'�/�/�:�:�
�	F�".�
�� )�9�5�
������#�����
� 4� 4�5���I� 6�7�	9�	����)�����
� 4� 4�5�� J�K�	M�	����#�����
� 4� 4�5�� ?�@�	B�!*�9�5�
�����)�*�����
� 4� 4�5���H� 5�6�	8�!*�9�5�
�����������
� 4� 4�5�� ?�@�	Brc�<���ddlm}|j�}|jjj
j}g�d�}||_�fd�|_|jd�dd|jjdd�g���fd	�}||_|jd
�|j�dg�|jd�g�dddd|jjdd�d
d|jjdd�g�dd|jd
�|j�dg�|jd�g�dddd|jjdd�d
d|jjdd�g�dd|jd
�|j�dg�y)Nrrc��gdggggS)N�
changed_groupr@r@rrr�zKTestDefaultControllerPlugin.test_update_changed_procs.<locals>.reloadConfig�s���/�*�B�/�0�0rc�*���jd|f�S)Nr�r@r�s �rrYzGTestDefaultControllerPlugin.test_update_changed_procs.<locals>.<lambda>�s���E�L�L�'�1��,F�rr�changed_processr��r_r`�statusrgc�.���jd|f��S)Nrdr@)r_r�r�s ��rr�zOTestDefaultControllerPlugin.test_update_changed_procs.<locals>.stopProcessGroup�s����L�L�&�$��(��Nrrm)rdr�changed_process1�changed_process2)r\rrrrr[r��startProcess�addProcessGrouprcrwr�r�rr�rn)rrr�r\r�r�r�r�s      @@r�test_update_changed_procsz5TestDefaultControllerPlugin.test_update_changed_procszs����%�������Z�Z�'�'�/�/�:�:�
���	1�".�
��"F�
���"�"�?�3�#4�#2�#)�=�=�#8�#8�#)�+�,��	�'7�
�#����������!:� ;�<��"�"�?�3���a��&8�&5�&,�m�m�&?�&?�&,�.�'9�&5�&,�m�m�&:�&:�&,�.�	/���
�	���������!:� ;�<��"�"�?�3���a��&8�&5�&,�m�m�&:�&:�&,�.�'9�&5�&,�m�m�&;�&;�&,�.�	/���
�	���������!:� ;�<rc���ddlm}|j�}|jjj
j}d�}||_dd|jjdd�g�dg|_	�fd�}||_
|jd	�|j|jg�dd|jjdd�g�dddg|_	|jd	�|j|jg�dd|jjdd�g�dddg|_	|jd	�|j|jdg�y)
Nrrc��ggdgggS)N�
removed_groupr@r@rrr�zKTestDefaultControllerPlugin.test_update_removed_procs.<locals>.reloadConfig�s����o�.�/�0�0r�removed_processrr�rc����Srr@)r_r�s �rr�zOTestDefaultControllerPlugin.test_update_removed_procs.<locals>.stopProcessGroup�s����Nrrm)r\rrrrr[r�rcrwr�r�r�rr�rn)rrr�r\r�r�r�s      @r�test_update_removed_procsz5TestDefaultControllerPlugin.test_update_removed_procs�sJ���%�������Z�Z�'�'�/�/�:�:�
�	1�".�
��#4�#2�#)�=�=�#8�#8�#)�+�,��!0�0�
��	�&6�
�#����������-�-�r�2�&7�&5�&,�m�m�&?�&?�&,�.�/���
�!0�0�
�����������-�-�r�2�&7�&5�&,�m�m�&:�&:�&,�.�/���
�!0�0�
�����������-�-��/@�Arc�.�|j�}|jjjj}d�}||_|j
tj|jd�|j|jjd�y)Nc�b�ddlm}tj|jj
d��)Nrrrnr�rs rr�zSTestDefaultControllerPlugin.test_update_reraises_other_faults.<locals>.reloadConfig�s ��)��/�/�&�-�-�"6�"6��A�Arrmr�)rrrr[r\r�rrrrfr�rrsr�s    r�!test_update_reraises_other_faultsz=TestDefaultControllerPlugin.test_update_reraises_other_faults�sn��������Z�Z�'�'�/�/�:�:�
�	B�#/�
�����)�/�/�6�+;�+;�R�@�������.�.��2rc��|j�}|j�|jjj	�}|jd|v�y)Nz
pid <name>)r�help_pidrr^r_rFrJs   r�
test_pid_helpz)TestDefaultControllerPlugin.test_pid_help�r�rc��|j�}|jd�}|j|d�|jj}|jj
j
�jd�}|jt|�d�|j|dt|jjj���y)Nrmrr�r)
r�do_pidrrrr^r_rr��strr[r\�getPID)rr�r'rrs     r�test_pid_supervisordz0TestDefaultControllerPlugin.test_pid_supervisord�s�����������r�"�������&��*�*�$�$���
�
�!�!�*�*�,�2�2�4�8������U��Q�'�����q��3�w���'A�'A�'H�'H�'J�#K�Lrc�z�|j�}|jd�}|j|d�|jjj�j
�}|j|j�gd��|j|jjtj�y)Nr~)�11�12�13)rrrrr^r_r9rrsrrwr:s    r�test_pid_allprocessesz1TestDefaultControllerPlugin.test_pid_allprocesses�s�����������u�%�������&��
�
�!�!�*�*�,�2�2�4���������(:�;�������.�.�0C�0K�0K�Lrc�Z�|j�}|jd�}|j|d�|jjj�j
�}|j|d�|j|jjtj�y)Nr/zNo such process BAD_NAME)
rrrrr^r_r9rsrrtr:s    r�test_pid_badnamez,TestDefaultControllerPlugin.test_pid_badname�s~����������z�*�������&��
�
�!�!�*�*�,�2�2�4������ :�;�������.�.�0C�0K�0K�Lrc�V�|j�}|jd�}|j|d�|j|jjj�j
�d�|j|jjtj�y)Nrr )
rrrrr^r_r9rsrrwr
s   r�test_pid_oneprocessz/TestDefaultControllerPlugin.test_pid_oneprocesssx����������u�%�������&�������*�*�3�3�5�;�;�=�t�D�������.�.�0C�0K�0K�Lrc��|j�}|jj}d�}||jj_|j
d�}|j|d�|j|jjj�j�d�|j|jjtj�y)Nc�<�ddlm}ddd|jddddddd�
S)NrrYrrsrmr]r^)rjrZrsrls   rrqzFTestDefaultControllerPlugin.test_pid_oneprocess_not_running.<locals>.f
s3��7�!�"��+�3�3�"+���!#��#4�
�

rr�0)rrrr[r\�getProcessInforrr^r_r9rsrr�)rr�rrqr's     r�test_pid_oneprocess_not_runningz;TestDefaultControllerPlugin.test_pid_oneprocess_not_running
s���������*�*�$�$��	�56����"�"�1����u�%�������&�������*�*�3�3�5�;�;�=�s�C�������.�.�,�8�8�	:rc���|j�}d�|j_g��fd�}||jjjj
_|jd�|j�g�y)Nc��yrr@r@rrrYzETestDefaultControllerPlugin.test_pid_upcheck_failed.<locals>.<lambda>#rZrc�(���jd�yr3r@rBs  �rrqz>TestDefaultControllerPlugin.test_pid_upcheck_failed.<locals>.f%rDrrm)	rrrSrr[r\rrrrFs   @r�test_pid_upcheck_failedz3TestDefaultControllerPlugin.test_pid_upcheck_failed!s^��������*��
�
����	 �78��
�
���"�"�-�-�4��
�
�b�������$rc��|j�}|j�|jjj	�}|jd|v�y)Nz tail of supervisor main log file)r�
help_maintailrr^r_rFrJs   r�test_maintail_helpz.TestDefaultControllerPlugin.test_maintail_help+rdrc�\�|j�}|jd�}|j|d�|jjj�}|j
|jd�|�|j|jjtj�y)Nr�zError: too many�r�do_maintailrrr^r_rFrIrsrrtrJs    r�test_maintail_toomanyargsz5TestDefaultControllerPlugin.test_maintail_toomanyargs1s~��������#�#�I�.�������&��j�j���(�(�*��������'8�9�3�?�������.�.�0C�0K�0K�Lrc�\�|j�}|jd�}|j|d�|jjj�}|j
|jd�|�|j|jjtj�y)Nz-wrongzError: bad argument -wrongr5rJs    r� test_maintail_minus_string_failsz<TestDefaultControllerPlugin.test_maintail_minus_string_fails9s~��������#�#�H�-�������&��j�j���(�(�*��������'C�D�c�J�������.�.�0C�0K�0K�Lrc�\�|j�}|jd�}|j|d�|jjj�}|j
|jd�|�|j|jjtj�y)N�wrongzError: bad argument wrongr5rJs    r�test_maintail_wrongz/TestDefaultControllerPlugin.test_maintail_wrongAs~��������#�#�G�,�������&��j�j���(�(�*��������'B�C�S�I�������.�.�0C�0K�0K�Lrc��|j�}t�|_|jd�}|j	|d�|jj
}|j	t
|�d�|d}|j	|jjd�|j	|dd�|jd|dv�y)Nrr�rz"http://localhost:65532/mainlogtailzCannot connect)	r�
DummyListener�listenerr6r�errorsr�r:rF)rr�r'r@rzs     r�_dont_test_maintail_dashfz5TestDefaultControllerPlugin._dont_test_maintail_dashfIs��������'�/����#�#�D�)�������&����'�'������V��a�(��q�	��������/�/�=�	?�����q��=�	?����(�E�!�H�4�5rc�b�|j�}|jd�}|j|d�|jjj�j
d�}|j|dd�|j|jjtj�y)Nz-zrrr!)
rr6rrr^r_rrsrrtrs    r�test_maintail_bad_modifierz6TestDefaultControllerPlugin.test_maintail_bad_modifierZs���������#�#�D�)�������&��
�
�!�!�*�*�,�2�2�4�8������q��#;�<�������.�.�0C�0K�0K�Lrc���|j�}|jd�}|j|d�|j|jjj�d�y)Nrm�mainlogdata
�rr6rrr^r_r
s   r�test_maintail_nobytesz1TestDefaultControllerPlugin.test_maintail_nobytesbsP��������#�#�B�'�������&�������*�*�3�3�5��Grc���|j�}|jd�}|j|d�|j|jjj�d�y)N�-100rErFr
s   r�test_maintail_dashbytesz3TestDefaultControllerPlugin.test_maintail_dashbyteshsP��������#�#�F�+�������&�������*�*�3�3�5��Grc��|j�}|jj�}ddlm}|j
j|_|jd�}|j|d�|j|jjj�d�|j|jjtj�y)NrrrIz!supervisord: ERROR (no log file)
)rrr�r\rrcr)�_readlog_errorr6rr^r_rsrrt�rr��supervisor_rpcrr's     r�"test_maintail_readlog_error_nofilez>TestDefaultControllerPlugin.test_maintail_readlog_error_nofilens�����������2�2�4��%�(.�
�
�(=�(=��%��#�#�F�+�������&�������*�*�3�3�5�=�	?�������.�.�0C�0K�0K�Lrc��|j�}|jj�}ddlm}|j
j|_|jd�}|j|d�|j|jjj�d�|j|jjtj�y)NrrrIz/supervisord: ERROR (unknown error reading log)
)rrr�r\rrcrnrLr6rr^r_rsrrtrMs     r�"test_maintail_readlog_error_failedz>TestDefaultControllerPlugin.test_maintail_readlog_error_failedys�����������2�2�4��%�(.�
�
�(<�(<��%��#�#�F�+�������&�������*�*�3�3�5�K�	M�������.�.�0C�0K�0K�Lrc���|j�}d�|j_g��fd�}||jjjj
_|jd�|j�g�y)Nc��yrr@r@rrrYzJTestDefaultControllerPlugin.test_maintail_upcheck_failed.<locals>.<lambda>�rZrc�(���jd�yr3r@rBs  �rrqzCTestDefaultControllerPlugin.test_maintail_upcheck_failed.<locals>.f�rDrrm)	rrrSrr[r\�readLogr6rrFs   @r�test_maintail_upcheck_failedz8TestDefaultControllerPlugin.test_maintail_upcheck_failed�s`��������*��
�
����	 �89��
�
���"�"�-�-�5����2�������$rc��|j�}|j�|jjj	�}|jd|v�y)Nzfg <process>)r�help_fgrr^r_rFrJs   r�test_fg_helpz(TestDefaultControllerPlugin.test_fg_help�s@������������j�j���(�(�*������#�-�.rc�b�|j�}|jd�}|j|d�|jjj�j
d�}|j|dd�|j|jjtj�y)NrmrrzERROR: no process name supplied�
r�do_fgrrr^r_rrsrrtrs    r�test_fg_too_few_argsz0TestDefaultControllerPlugin.test_fg_too_few_args�s�����������b�!�������&��
�
�!�!�*�*�,�2�2�4�8������q��#D�E�������.�.�0C�0K�0K�Lrc�>�|j�}|jd�}|j|d�|jjj�}|j|d�|j|jjtj�y)Nr�z'ERROR: too many process names supplied
�	rr\rrr^r_rsrrt�rr�r'r,s    r�test_fg_too_many_argsz1TestDefaultControllerPlugin.test_fg_too_many_args�su����������i�(�������&��z�z� � �)�)�+������I�J�������.�.�0C�0K�0K�Lrc�>�|j�}|jd�}|j|d�|jjj�}|j|d�|j|jjtj�y)Nr/z!ERROR: bad process name supplied
r_r`s    r�test_fg_badprocnamez/TestDefaultControllerPlugin.test_fg_badprocname�su����������j�)�������&��z�z� � �)�)�+������C�D�������.�.�0C�0K�0K�Lrc��|j�}|jd�}|j|d�|jjj�}|j|d�|jd�}|jjj�j
d�}|j|d�|j|dd�|j|jjtj�y)NrhzERROR: process not running
�baz_01r���zERROR: process not runningr[)rr�r'r,rs     r�test_fg_procnotrunningz2TestDefaultControllerPlugin.test_fg_procnotrunning�s�����������e�$�������&��z�z� � �)�)�+������=�>����h�'���
�
�!�!�*�*�,�2�2�4�8�������&�����r��$@�A�������.�.�0C�0K�0K�Lrc���|j�}d�|j_g��fd�}||jjjj
_|jd�|j�g�y)Nc��yrr@r@rrrYzDTestDefaultControllerPlugin.test_fg_upcheck_failed.<locals>.<lambda>�rZrc�(���jd�yr3r@rBs  �rrqz=TestDefaultControllerPlugin.test_fg_upcheck_failed.<locals>.f�rDrr)	rrrSrr[r\r+r\rrFs   @r�test_fg_upcheck_failedz2TestDefaultControllerPlugin.test_fg_upcheck_failed�s^��������*��
�
����	 �?@��
�
���"�"�-�-�<����U�������$rc��|j�}|j�|jjj	�}|jd|v�y�NzExit the supervisor shell)r�	help_exitrr^r_rFrJs   r�test_exit_helpz*TestDefaultControllerPlugin.test_exit_help��C������������j�j���(�(�*�����3�s�:�;rc��|j�}|j�|jjj	�}|jd|v�yrm)r�	help_quitrr^r_rFrJs   r�test_quit_helpz*TestDefaultControllerPlugin.test_quit_help�rprN)�r=r>r?rrrrrr"r'r+r-r0r2r4r7r<rGrLrQrVrnrurxr|rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr
rrrrrrr!r$r'r+r-r/r1r7r:r>r@rCrGrLrQrTrZr]r_rcrhrjrrryr~r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr
rrrrr#r%r'r,r0r3r7r9r<rArCrGrJrOrQrVrYr]rarcrgrkrorsr@rrrr�s���'��M�M�M�M�2�M�M�M�0�2�2�M�%�0�%�8�9�BS�@�O�S�M�S�	S�O�O�O�/�R�M�M�M�M�Q�Q�+�M�M�M�R�	Q�
%�.�M�M�M�M�M�M�M�M�M�M�
%�>�M�M�M�M�M�Q�3�M�M�M�M�
%�1�M�M�	Q�
%�/�M�M�M�M�M�	M�
%�-�M�M�M�A�
M�%�A�G�F�M�C�M�E�M�
M�M� M� M�,�M�M�M�	M�	M�M�+�&9�
'�M�
M�
M�-�M�M�M�M�M�
M�3�M�M�M�
?�	<�
=�B�@3=�j'B�R
3�-�M�M�M�M�:�.%�C�M�M�M�6�"M�H�H�	M�	M�%�/�M�M�M�
M�%�<�<rrc��eZdZd�Zd�Zd�Zy)r>c��g|_yr)r@r;s r�__init__zDummyListener.__init__�s	����rc�>�|jj||f�yr)r@rA)r�urlr�s   rrzzDummyListener.error�s�������C��:�&rc��||_yrr9)rrxs  rr<zDummyListener.close�s	����rN)r=r>r?rvrzr<r@rrr>r>�s���'�rr>c��eZdZd�Zd�Zy)�DummyPluginFactoryc��||_yr�r)rrrps   rrvzDummyPluginFactory.__init__�s	����rc�N�|jjjd�y)Nr�)rr^�write�rros  rr�zDummyPluginFactory.do_help�s���������l�+rN�r=r>r?rvr�r@rrr{r{�s���,rr{c��eZdZd�Zd�Zy)rc��d|_d|_d|_d|_d|_d|_t
�|_d|_dtifg|_
y)Nr\zhttp://localhost:65532�chrism�123r@F�dummy)rO�	serverurl�username�password�history_filer�r	r[�interactiver{�plugin_factoriesr;s rrvzDummyClientOptions.__init__�sR��"���1��� ��
���
� ������%�'��� ���")�+=�r�!B� C��rc��|jSr)r[r;s rr�z!DummyClientOptions.getServerProxy�s���|�|�rN)r=r>r?rvr�r@rrrr�s
��	D�rrc�>�eZdZdZd�Zd�Zd�Zd
d�Zd�Zd�Z	d
d	�Z
y)rz
no help on %sc�h�||_g|_t�|_tj
|_yr)rrrr^rrwrsrMs  rrvzDummyController.__init__�s'����� ����j���-�5�5��rc��yr3r@r;s rrSzDummyController.upcheck�s��rc�$�|jd�S)Nr\)r�r;s rr�zDummyController.get_supervisor�s���$�$�\�2�2rNc�V�|jj�}|�|St||�Sr)rr��getattr)r�	namespacer�s   rr�z DummyController.get_server_proxy�s,�����+�+�-�����L��5�)�,�,rc�@�|jj|dz�y)Nr)r^r)r�datas  rr�zDummyController.outputs�������$��+�&rc�B�|jj||||f�yr)rrA)r�doc_headers�cmds_doc�rows�colss     r�print_topicszDummyController.print_topicss�����"�"�K��4��#F�Grc��ddlm}||tjjfvry||vrt
j|_yt
j|_y)Nr)�DEAD_PROGRAM_FAULTS)	rr�rrcrwrr�rsrt)r�	faultcode�ignored_faultcoder�s    r� set_exitstatus_from_xmlrpc_faultz0DummyController.set_exitstatus_from_xmlrpc_faultsC��@��*�F�M�M�,A�,A�B�B��
�-�
-�1�=�=�D�O�1�9�9�D�Orr)r=r>r?r�rvrSr�r�r�r�r�r@rrrr�s+��
�F�6��3�-�'�H�:rrc��eZdZdd�Zd�Zy)r�Nc��||_yrr})rrQs  rrvzDummyPlugin.__init__s	����rc��d|_yr3)r�r�s  rr�zDummyPlugin.do_helps	����rrr�r@rrr�r�s���rr�c�V�tjtjt�Sr)�unittest�
findTestCases�sys�modulesr=r@rr�
test_suiter�s���!�!�#�+�+�h�"7�8�8r�__main__r�)�defaultTest)r�r�r\r�supervisor.compatrrrrr�supervisor.tests.baser	�TestCaserrIr�rr>r{rrr�r�r=�mainr@rr�<module>r�s���
���&�'�O�0�=3�X�&�&�=3�~p�h�'�'�p�f<�x�0�0�<�>r<�(�"3�"3�r<�h/��,�,�
�
�":�":�H��9��z���H�M�M�l�+�r

Youez - 2016 - github.com/yon3zu
LinuXploit