<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<br>
<div class="moz-cite-prefix">On 27.10.2015 10:22, Martin Basti
wrote:<br>
</div>
<blockquote cite="mid:562F424D.3060003@redhat.com" type="cite">
<br>
<br>
On 27.10.2015 10:00, Oleg Fayans wrote:
<br>
<blockquote type="cite">Hi Martin,
<br>
<br>
The updated version of the patch is attached. Please, see my
comments below
<br>
</blockquote>
My comments inline, I may be completely wrong in how the test
suite work, so feel free to correct me.
<br>
<br>
Martin
<br>
<br>
<blockquote type="cite">
<br>
On 10/26/2015 06:48 PM, Martin Basti wrote:
<br>
<blockquote type="cite">
<br>
<br>
On 26.10.2015 08:59, Oleg Fayans wrote:
<br>
<blockquote type="cite">
<br>
<br>
On 10/23/2015 03:10 PM, Martin Basti wrote:
<br>
<blockquote type="cite">
<br>
<br>
On 23.10.2015 15:00, Oleg Fayans wrote:
<br>
<blockquote type="cite">Hi Martin,
<br>
<br>
Here comes the updated version.
<br>
<br>
On 10/22/2015 05:38 PM, Martin Basti wrote:
<br>
<blockquote type="cite">
<br>
<br>
On 22.10.2015 15:23, Martin Basti wrote:
<br>
<blockquote type="cite">
<br>
On 22.10.2015 14:13, Oleg Fayans wrote:
<br>
<blockquote type="cite">
<br>
<br>
<br>
</blockquote>
<br>
Hello,
<br>
<br>
thank you for the patch.
<br>
<br>
1)
<br>
please remove the added empty lines, they are
unrelated to this
<br>
ticket
<br>
</blockquote>
</blockquote>
<br>
done
<br>
<br>
<blockquote type="cite">
<blockquote type="cite">
<br>
2)
<br>
-def install_master(host, setup_dns=True,
setup_kra=False):
<br>
+def install_master(host, setup_dns=True,
setup_kra=False,
<br>
domainlevel=1):
<br>
<br>
I suggest to use default domainlevel=None, which
will use the default
<br>
domain level (specified in build)
<br>
</blockquote>
</blockquote>
<br>
done
<br>
<br>
<blockquote type="cite">
<blockquote type="cite">
<br>
3)
<br>
+ domain_level = domainlevel(master)
<br>
I do not think that this meets expectations.
<br>
<br>
We have to test, both domain level 0 and 1 for IPA
4.3, respectively
<br>
new IPA must support all older domain levels, domain
level is
<br>
independent on IPA version, only admin can raise it
up.
<br>
<br>
So you have to find out way how to pass the domain
level for which
<br>
test will be running, we were talking about using
config files, but
<br>
feel free to find something new and better
<br>
</blockquote>
</blockquote>
<br>
Fixed. Now, we declare domain level in config.yaml with
the directive
<br>
domain_level
<br>
<br>
<blockquote type="cite">
<blockquote type="cite">
<br>
4)
<br>
Did you resolve the pytest fixtures which specifies
which tests
<br>
can be
<br>
run under which domain level?
<br>
</blockquote>
</blockquote>
<br>
In fact, we do not seem to have any tests yet that would
require it.
<br>
All the existing tests just use install_replica
<br>
method, no matter how is it done.
<br>
</blockquote>
How about topology CI test? This can be executed only with
domain level
<br>
</blockquote>
<br>
That's right. The topology test was updated. Patch is
attached
<br>
together with a proper version of 11-th patch (not a swap
file, sorry
<br>
about that).
<br>
<br>
<blockquote type="cite">1, right?
<br>
<blockquote type="cite">
<br>
<blockquote type="cite">
<blockquote type="cite">
<br>
5)
<br>
+ '--ip-address', client.ip,
<br>
<br>
why this change to client install?
<br>
</blockquote>
</blockquote>
<br>
Right, it found to be unnecessary.
<br>
<br>
<blockquote type="cite">
<blockquote type="cite">
<br>
Martin^2
<br>
<br>
<br>
</blockquote>
6)
<br>
************* Module ipatests.test_integration.tasks
<br>
ipatests/test_integration/tasks.py:85:
[E1123(unexpected-keyword-arg),
<br>
allow_sync_ptr] Unexpected keyword argument
'raiseonerr' in function
<br>
call)
<br>
</blockquote>
<br>
Fixed
<br>
<br>
<blockquote type="cite">
<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
1)
<br>
+ if not host.config.domain_level == None:
<br>
+ args.append("--domain-level=%i" %
host.config.domain_level)
<br>
<br>
always use: variable *is not None*
<br>
<br>
2)
<br>
Why there is specified level 1 as default? IIRC we agreed that
the
<br>
default level is the one which is default in tested package.
<br>
These should be None and "":
<br>
+ "domain_level": "1"
<br>
<br>
+ "DOMAINLVL": "1",
<br>
<br>
3)
<br>
However, as I read the patch 12, and I'm right, the
pytest.fixture needs
<br>
to know the value of domain level before we can do any dynamic
detection
<br>
on master.
<br>
<br>
So we should use the constants MAX_DOMAIN_LEVEL as default,
for 2)
<br>
</blockquote>
Done
<br>
<blockquote type="cite">
<br>
Also I'm not sure if the values are inherited from the
<br>
DEFAULT_OUTPUT_DICT to code, I think it is not, so for this
part you
<br>
need default value, or the fixture will not work as expected.
<br>
+ self.domain_level = kwargs.get('domain_level',
MAX_DOMAIN_LEVEL)
<br>
</blockquote>
<br>
This won't work in cases when domainlevel is explicitly set to 0
in config.yaml. This default value will always override the
explicit one.
<br>
</blockquote>
wat? in case that kwargs is dict containing values from config
file:
<br>
<br>
In [1]: kwargs = dict(domain_level=0)
<br>
<br>
In [2]: kwargs.get('domain_level', 123)
<br>
Out[2]: 0
<br>
<br>
</blockquote>
Respectively you should use this:<br>
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
<pre style="background-color:#ffffff;color:#000000;font-family:'DejaVu Sans Mono';font-size:9.0pt;"><span style="background-color:#e4e4ff;">self</span>.domain_level = kwargs.get(<span style="color:#008000;font-weight:bold;">'domain_level'</span>) <span style="color:#000080;font-weight:bold;">or </span><span style="color:#008000;font-weight:bold;"></span>MAX_DOMAIN_LEVEL
because kwargs IMO contains undefined config values as None
</pre>
<br>
<br>
<blockquote cite="mid:562F424D.3060003@redhat.com" type="cite">
<blockquote type="cite">
<br>
<blockquote type="cite">
<br>
freeipa-tests depends on freeipa-python so the constants
should be
<br>
available in tests.
<br>
<br>
So then you also need update this line
<br>
<br>
+ if not host.config.domain_level != MAX_DOMAIN_LEVEL:
<br>
+ args.append("--domain-level=%i" %
host.config.domain_level)
<br>
</blockquote>
<br>
This would not work if domainlevel is not set in config.yaml, in
which case the host.config.domain_level is None.
<br>
</blockquote>
Domain level will never be None because self.domain_level =
kwargs.get('domain_level', MAX_DOMAIN_LEVEL)
<br>
<br>
<blockquote type="cite">
<br>
<blockquote type="cite">
<br>
4)
<br>
Please add comment to function +def domainlevel(host): that it
is useful
<br>
for test where domain level will be raised dynamically,
otherwise it may
<br>
be lost after test refactoring as somebody may consider it as
unneeded
<br>
and replace it with config dict.
<br>
</blockquote>
Done
<br>
<br>
<blockquote type="cite">
<br>
So summary is the 1) and 2) are replaced by 3) :)
<br>
<br>
Martin^2
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>