HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/samba/tests/samba_tool/__pycache__/fsmo.cpython-310.pyc
o

�/at�@s0ddlZddlZddlmZGdd�de�ZdS)�N)�SambaToolCmdTestc@seZdZdZdd�ZdS)�FsmoCmdTestCasez(Test for samba-tool fsmo show subcommandc	
Cs0|�dd�\}}}|�|||�|�|dd�|�ddtjddtjd	tjd
f�}z%|jt�|d�|�	�tj
dgd
�}|�dt|ddd�|v�Wn&tj
yx}z|j\}}|tjkrm|�d|v�n�WYd}~nd}~ww|j|�	�tj
dgd
�}|�dt|ddd�|v�dS)z!Run fsmo show to see if it errors�fsmo�show�zShouldn't be any error messagesz-Hz	ldap://%s�SERVERz-U%s%%%s�USERNAME�PASSWORDz#CN=Infrastructure,DC=DomainDnsZones�
fsmoRoleOwner)�base�scope�attrsz DomainDnsZonesMasterRole owner: rz2The 'domaindns' role is not present in this domainNzDomainNamingMasterRole owner: )�	runsubcmd�assertCmdSuccess�assertEqual�getSamDB�os�environ�search�ldb�Dn�get_default_basedn�
SCOPE_BASE�
assertTrue�str�LdbError�args�ERR_NO_SUCH_OBJECT)	�self�result�out�err�samdb�res�e�enum�string�r'�=/usr/lib/python3/dist-packages/samba/tests/samba_tool/fsmo.py�test_fsmogets.��&

���
�&zFsmoCmdTestCase.test_fsmogetN)�__name__�
__module__�__qualname__�__doc__r)r'r'r'r(rsr)rr�samba.tests.samba_tool.baserrr'r'r'r(�<module>s