Problematic test: samba.tests.samba_tool.demote

Noel Power nopower at suse.com
Thu Jun 28 08:19:51 UTC 2018


Hi Andrew


On 27/06/18 19:33, Andrew Bartlett wrote:
> On Wed, 2018-06-27 at 15:58 +0100, Noel Power wrote:
>> Andrew/Gary
>>
>> Hi Guys I need some help/advice or a dig out wrt the
>> samba.tests.samba_tool.demote test. This test is failing in my PY3 wip
>> branch. However the reason it fails is that the test itself doesn't
>> clean up properly after it completes, running the test a second time
>> (which is what happens when PY3 is enabled) and it fails. You don't even
>> need to involve PY3, just rerun the test a second time 
[...]
>> So I guess the ntds_dn and associated records don't exists anymore, I
>> tried manually trying to repromote the DC in the cleanUp but failed to
>> get it to work (mostly likely 'cause I don't know what I am doing :-))
>>
>> Ideas or a fix welcome :-)
> G'Day Noel,
>
> You are correct, this test (deliberately) destroys the test environment.
>
> You can't really put it back, it just isn't an idempotent test. 
>
> Perhaps test dropping one environment with python2 and a different one
> with python3, or find a way to just unit test some of the elements
> against a local or saved provision?
>
> Sorry for the sharp edges!
>

No problem, thanks for the info. Will look into seeing if I can get it
to run py3 only somehow.

Thanks alot
Noel



More information about the samba-technical mailing list