[Freeipa-devel] [freeipa PR#181][+ack] Tests : User Tracker creation of user with minimal values

2016-12-15 Thread mirielka
  URL: https://github.com/freeipa/freeipa/pull/181
Title: #181: Tests : User Tracker creation of user with minimal values

Label: +ack
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#210][+ack] Tests: Stage User Tracker implementation

2016-12-15 Thread mirielka
  URL: https://github.com/freeipa/freeipa/pull/210
Title: #210: Tests: Stage User Tracker implementation

Label: +ack
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#181][comment] Tests : User Tracker creation of user with minimal values

2016-12-06 Thread mirielka
  URL: https://github.com/freeipa/freeipa/pull/181
Title: #181: Tests : User Tracker creation of user with minimal values

mirielka commented:
"""
Please check inline comments. Also suggestion for more test cases:
- try to create a user whose automatically generated uid would be too long (>32 
characters)
- try to create a user whose automatically generated uid would contain invalid 
characters (other than letters, numbers, _, -, . and $).
Also goes for PR #210 
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/181#issuecomment-265110867
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#310][opened] WIP: CLI testing

2016-12-06 Thread mirielka
   URL: https://github.com/freeipa/freeipa/pull/310
Author: mirielka
 Title: #310: WIP: CLI testing
Action: opened

PR body:
"""
Here is basic part of CLI testing for you to take a look at and provide 
feedback, before it's all done and polished up.

How it works: so far it's only tuned to run stageuser tests, so use 
`./make-tests ipatests/test_xmlrpc/test_stageuser_plugin.py --cli` to run in 
CLI mode, or of course without the --cli option to run original API tests. Note 
that last three tests are expected to fail in CLI mode as group tracker has not 
been modified for CLI testing yet.

What gets changed: 
- '--cli' option is added
- base tracker: changes that should ensure the basic functionality to run 
existing tests in CLI mode, this includes way how to execute commands and 
mapping of defined API options and output values to the CLI style (the idea of 
the mapping was to convert the text output from CLI to API style output so that 
more extensive methods to compare CLI output with expected values do not have 
to be created)
- specific trackers: changes are needed because CLI calls have different output 
than API calls (some messages are different, some items of API output are not 
present in CLI). So far I've modified stageuser tracker fully (i.e. that one 
should be final) and user tracker partly (just so that stageuser tests that use 
user tracker work properly, but user tests will not work in CLI mode yet).
- xmlrpc_test.py: unfortunately I failed to find a way how to raise the 
exception from subprocess so that it would fit the exception comparison using 
raises_exact method, so I chose to raise ExecutionError when it occurs in 
subprocess and compare just the error message in stderr. Since I expect the CLI 
tests to be run along with API tests, any change in type of raised error should 
be cought by API tests.

So far I observed:
- positives: no tests need to be changed, all the necessary changes are in 
trackers (which was the intention)
- negatives: only works for tracker based tests, i.e. not for declarative tests 
or tests that use just api.Command style; tests run longer that API tests

So please, if you have any comment and suggestions, I'll be glad to hear them 
so that I can polish this and finish the modifications.
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/310/head:pr310
git checkout pr310
From bf7cdbd506f6bda731aa68f44bd08d84c8136938 Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Tue, 6 Dec 2016 09:31:20 +0100
Subject: [PATCH 1/3] WIP: CLI testing - new option to run tests

Add --cli option to ipa-run-tests/make-test command
---
 ipatests/pytest.ini|  1 +
 ipatests/pytest_plugins/tracker.py | 12 
 2 files changed, 13 insertions(+)
 create mode 100644 ipatests/pytest_plugins/tracker.py

diff --git a/ipatests/pytest.ini b/ipatests/pytest.ini
index b2497cb..b60c092 100644
--- a/ipatests/pytest.ini
+++ b/ipatests/pytest.ini
@@ -13,6 +13,7 @@ addopts = --doctest-modules
   -p ipatests.pytest_plugins.integration
   -p ipatests.pytest_plugins.beakerlib
   -p ipatests.pytest_plugins.additional_config
+  -p ipatests.pytest_plugins.tracker
 # Ignore files for doc tests.
 # TODO: ideally, these should all use __name__=='__main__' guards
   --ignore=ipasetup.py
diff --git a/ipatests/pytest_plugins/tracker.py b/ipatests/pytest_plugins/tracker.py
new file mode 100644
index 000..5b9e7e1
--- /dev/null
+++ b/ipatests/pytest_plugins/tracker.py
@@ -0,0 +1,12 @@
+#
+# Copyright (C) 2016  FreeIPA Contributors see COPYING for license
+#
+
+import pytest
+
+
+def pytest_addoption(parser):
+group = parser.getgroup("IPA tracker tests")
+
+group.addoption('--cli', dest='cli', action='store_true', default=False,
+help="Run tests as CLI instead of API.")

From f2dc1a3bcee2133c36ad07beb54695cafac2263c Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Tue, 6 Dec 2016 09:32:32 +0100
Subject: [PATCH 2/3] WIP: CLI testing - base tracker

Extend base tracker to have functionality to run existing tests in CLI mode if --cli option is specified.
---
 ipatests/test_xmlrpc/tracker/base.py | 129 +++
 ipatests/test_xmlrpc/xmlrpc_test.py  |   8 ++-
 2 files changed, 123 insertions(+), 14 deletions(-)

diff --git a/ipatests/test_xmlrpc/tracker/base.py b/ipatests/test_xmlrpc/tracker/base.py
index aa88e6b..c055b36 100644
--- a/ipatests/test_xmlrpc/tracker/base.py
+++ b/ipatests/test_xmlrpc/tracker/base.py
@@ -14,6 +14,12 @@
 from ipapython.version import API_VERSION
 from ipatests.util import Fuzzy
 
+import subprocess
+import os
+import re
+import pytest
+from ipalib.cli import to_cli
+
 
 class Tracker(object):
 """Wraps and tracks modifications to a plugin LDAP e

[Freeipa-devel] [freeipa PR#294][comment] client, platform: Use paths.SSH* instead of get_config_dir().

2016-12-01 Thread mirielka
  URL: https://github.com/freeipa/freeipa/pull/294
Title: #294: client, platform: Use paths.SSH* instead of get_config_dir().

mirielka commented:
"""
Build passes fine, pep8 does not:
./ipaclient/install/client.py:1006:80: E501 line too long (82 > 79 characters)
./ipaclient/install/client.py:1029:80: E501 line too long (83 > 79 characters)
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/294#issuecomment-264171920
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#242][opened] [master] Tests: Providing trust tests with tree root domain

2016-11-15 Thread mirielka
   URL: https://github.com/freeipa/freeipa/pull/242
Author: mirielka
 Title: #242: [master] Tests: Providing trust tests with tree root domain
Action: opened

PR body:
"""
https://fedorahosted.org/freeipa/ticket/6347

Note: This PR is rebased version of https://github.com/freeipa/freeipa/pull/119 
for master
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/242/head:pr242
git checkout pr242
From 281ac6bd9b16cf4628124f6fb3c0f3b1d1291a8d Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Thu, 22 Sep 2016 14:09:03 +0200
Subject: [PATCH] Tests: Providing trust tests with tree root domain

https://fedorahosted.org/freeipa/ticket/6347
---
 ipatests/pytest_plugins/integration.py  |   2 +-
 ipatests/test_integration/test_trust.py | 110 
 2 files changed, 97 insertions(+), 15 deletions(-)

diff --git a/ipatests/pytest_plugins/integration.py b/ipatests/pytest_plugins/integration.py
index f946a07..de37bf3 100644
--- a/ipatests/pytest_plugins/integration.py
+++ b/ipatests/pytest_plugins/integration.py
@@ -172,7 +172,7 @@ def mh(request, class_integration_logs):
 for _i in range(cls.num_ad_domains):
 domain_descriptions.append({
 'type': 'AD',
-'hosts': {'ad': 1, 'ad_subdomain': 1},
+'hosts': {'ad': 1, 'ad_subdomain': 1, 'ad_treedomain': 1},
 })
 
 mh = make_multihost_fixture(
diff --git a/ipatests/test_integration/test_trust.py b/ipatests/test_integration/test_trust.py
index 27c0e56..06bc493 100644
--- a/ipatests/test_integration/test_trust.py
+++ b/ipatests/test_integration/test_trust.py
@@ -31,7 +31,7 @@ class ADTrustBase(IntegrationTest):
 
 topology = 'line'
 num_ad_domains = 1
-optional_extra_roles = ['ad_subdomain']
+optional_extra_roles = ['ad_subdomain', 'ad_treedomain']
 
 @classmethod
 def install(cls, mh):
@@ -52,6 +52,14 @@ def install(cls, mh):
 except LookupError:
 cls.ad_subdomain = None
 
+# Determine whether the tree domain AD is available
+try:
+cls.tree_ad = cls.host_by_role(cls.optional_extra_roles[1])
+cls.ad_treedomain = '.'.join(
+cls.tree_ad.hostname.split('.')[1:])
+except LookupError:
+cls.ad_treedomain = None
+
 cls.configure_dns_and_time()
 
 @classmethod
@@ -98,9 +106,10 @@ def test_all_trustdomains_found(self):
   'trustdomain-find',
   self.ad_domain])
 
-# Check that both trustdomains appear in the result
+# Check that all trustdomains appear in the result
 assert self.ad_domain in result.stdout_text
 assert self.ad_subdomain in result.stdout_text
+assert self.ad_treedomain in result.stdout_text
 
 
 class ADTrustSubdomainBase(ADTrustBase):
@@ -116,20 +125,26 @@ def configure_dns_and_time(cls):
 @classmethod
 def install(cls, mh):
 super(ADTrustSubdomainBase, cls).install(mh)
-cls.ad = cls.ad_domains[0].ads[0]
-cls.ad_domain = cls.ad.domain.name
-cls.install_adtrust()
-cls.check_sid_generation()
-
-# Determine whether the subdomain AD is available
-# if not, skip the whole suite
-try:
-cls.child_ad = cls.host_by_role(cls.optional_extra_roles[0])
-cls.ad_subdomain = '.'.join(cls.child_ad.hostname.split('.')[1:])
-except LookupError:
+if not cls.ad_subdomain:
 raise nose.SkipTest('AD subdomain is not available.')
 
-cls.configure_dns_and_time()
+
+class ADTrustTreedomainBase(ADTrustBase):
+"""
+Base class for tests involving tree root domains of trusted forests
+"""
+
+@classmethod
+def configure_dns_and_time(cls):
+tasks.configure_dns_for_trust(cls.master, cls.ad_treedomain)
+tasks.sync_time(cls.master, cls.tree_ad)
+
+@classmethod
+def install(cls, mh):
+super(ADTrustTreedomainBase, cls).install(mh)
+if not cls.ad_treedomain:
+raise nose.SkipTest('AD tree root domain is not available.')
+
 
 class TestBasicADTrust(ADTrustBase):
 """Basic Integration test for Active Directory"""
@@ -343,6 +358,73 @@ def test_all_trustdomains_found(self):
 'Test case unapplicable, present for inheritance reason only')
 
 
+class TestExternalTrustWithTreedomain(ADTrustTreedomainBase):
+"""
+Test establishing external trust with tree root domain
+"""
+
+def test_establish_trust(self):
+""" Tests establishing external trust with Active Directory """
+tasks.establish_trust_with_ad(
+self.master, self.ad_treedomain,
+extra_

[Freeipa-devel] [freeipa PR#119][edited] [ipa-4-4] Tests: Providing trust tests with tree root domain

2016-11-15 Thread mirielka
   URL: https://github.com/freeipa/freeipa/pull/119
Author: mirielka
 Title: #119: [ipa-4-4] Tests: Providing trust tests with tree root domain
Action: edited

 Changed field: title
Original value:
"""
Tests: Providing trust tests with tree root domain
"""

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#224][+ack] Integration tests for certs in idoverrides

2016-11-14 Thread mirielka
  URL: https://github.com/freeipa/freeipa/pull/224
Title: #224: Integration tests for certs in idoverrides

Label: +ack
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#210][comment] Tests: Stage User Tracker implementation

2016-11-13 Thread mirielka
  URL: https://github.com/freeipa/freeipa/pull/210
Title: #210: Tests: Stage User Tracker implementation

mirielka commented:
"""
Review notes: same as in https://github.com/freeipa/freeipa/pull/181
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/210#issuecomment-260255679
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#181][comment] Tests : User Tracker creation of user with minimal values

2016-11-13 Thread mirielka
  URL: https://github.com/freeipa/freeipa/pull/181
Title: #181: Tests : User Tracker creation of user with minimal values

mirielka commented:
"""
Having "None" default values for obligatory arguments does not seem to be a 
good idea. If the method was called with default values, it would fail. It 
would be best if obligatory arguments ("givenname" and "sn") were provided as 
positional arguments and voluntary "name" as keyword argument. Please note that 
such a change will cause failure of existing tests that use this tracker, 
therefore it's necessary to fix them as well - include this in separate commit 
of this PR. Also please don't forget to add testcases for which this PR was 
created originally - creating user without the "name" argument (both positive 
and negative testcases).
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/181#issuecomment-260255613
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#224][comment] Integration tests for certs in idoverrides

2016-11-10 Thread mirielka
  URL: https://github.com/freeipa/freeipa/pull/224
Title: #224: Integration tests for certs in idoverrides

mirielka commented:
"""
Functionally OK. 
Please extend commit message for the first commit and add links to tickets if 
applicable. Also ticket https://fedorahosted.org/freeipa/ticket/6146 is in 
closed milestone, please request update to open milestone.
I did not do code review yet, will provide next week.
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/224#issuecomment-259736844
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#208][edited] Tests: Fix integration sudo test

2016-11-02 Thread mirielka
   URL: https://github.com/freeipa/freeipa/pull/208
Author: mirielka
 Title: #208: Tests: Fix integration sudo test
Action: edited

 Changed field: body
Original value:
"""
Tests with sudorules using only RunAsGroups attributes with empty RunAsUsers
attribute fail due to different expected value than is really returned. This is
caused by improper behaviour of sudo in versions before 1.8.18 (see [1]), to
which the tests were originally fitted. Changing the expected value to proper
one.

[1] - https://www.sudo.ws/pipermail/sudo-workers/2016-November/001025.html

https://fedorahosted.org/freeipa/ticket/6378

Please note that this PR needs to go to master, ipa-4-4 AND ipa-4-3 branches 
(ticket milestone is to be updated).
"""

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#208][opened] Tests: Fix integration sudo test

2016-11-02 Thread mirielka
   URL: https://github.com/freeipa/freeipa/pull/208
Author: mirielka
 Title: #208: Tests: Fix integration sudo test
Action: opened

PR body:
"""
Tests with sudorules using only RunAsGroups attributes with empty RunAsUsers
attribute fail due to different expected value than is really returned. This is
caused by improper behaviour of sudo in versions before 1.8.18 (see [1]), to
which the tests were originally fitted. Changing the expected value to proper
one.

[1] - https://www.sudo.ws/pipermail/sudo-workers/2016-November/001025.html

https://fedorahosted.org/freeipa/ticket/6378

Please note that this PR needs to go to master, ipa-4-4 AND ipa-4-3 branches 
(ticket milestone is to be updated).
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/208/head:pr208
git checkout pr208
From c67887803e221a3916fdfa9cb779f0363ee02670 Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Wed, 5 Oct 2016 14:25:01 +0200
Subject: [PATCH] Tests: Fix integration sudo test

Tests with sudorules using only RunAsGroups attributes with empty RunAsUsers
attribute fail due to different expected value than is really returned. This is
caused by improper behaviour of sudo in versions before 1.8.18 (see [1]), to
which the tests were originally fitted. Changing the expected value to proper
one.

[1] - https://www.sudo.ws/pipermail/sudo-workers/2016-November/001025.html

https://fedorahosted.org/freeipa/ticket/6378
---
 ipatests/test_integration/test_sudo.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ipatests/test_integration/test_sudo.py b/ipatests/test_integration/test_sudo.py
index a1676a2..1fbdee3 100644
--- a/ipatests/test_integration/test_sudo.py
+++ b/ipatests/test_integration/test_sudo.py
@@ -530,7 +530,7 @@ def test_sudo_rule_restricted_to_running_as_single_group_setup(self):
 
 def test_sudo_rule_restricted_to_running_as_single_group(self):
 result1 = self.list_sudo_commands("testuser1", verbose=True)
-assert "RunAsUsers: root" in result1.stdout_text
+assert "RunAsUsers: testuser1" in result1.stdout_text
 assert "RunAsGroups: testgroup2" in result1.stdout_text
 
 def test_setting_category_to_all_with_valid_entries_runasgroup(self):
@@ -551,7 +551,7 @@ def test_sudo_rule_restricted_to_running_as_single_local_group_setup(self):
 
 def test_sudo_rule_restricted_to_running_as_single_local_group(self):
 result1 = self.list_sudo_commands("testuser1", verbose=True)
-assert "RunAsUsers: root" in result1.stdout_text
+assert "RunAsUsers: testuser1" in result1.stdout_text
 assert "RunAsGroups: localgroup" in result1.stdout_text
 
 def test_setting_category_to_all_with_valid_entries_runasgroup_local(self):
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#194][opened] Tests: Verify that validity info is present in cert-show and cert-find command

2016-10-27 Thread mirielka
   URL: https://github.com/freeipa/freeipa/pull/194
Author: mirielka
 Title: #194: Tests: Verify that validity info is present in cert-show and 
cert-find command
Action: opened

PR body:
"""
https://fedorahosted.org/freeipa/ticket/6419
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/194/head:pr194
git checkout pr194
From 729ef52ff88a715a9191b2b205f5aaacd3570905 Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Thu, 27 Oct 2016 08:38:25 +0200
Subject: [PATCH] Tests: Verify that validity info is present in cert-show and
 cert-find command

https://fedorahosted.org/freeipa/ticket/6419
---
 ipatests/test_xmlrpc/test_cert_plugin.py | 4 
 1 file changed, 4 insertions(+)

diff --git a/ipatests/test_xmlrpc/test_cert_plugin.py b/ipatests/test_xmlrpc/test_cert_plugin.py
index bac3e94..206e0ef 100644
--- a/ipatests/test_xmlrpc/test_cert_plugin.py
+++ b/ipatests/test_xmlrpc/test_cert_plugin.py
@@ -229,6 +229,8 @@ def test_0008_cert_show(self):
 """
 res = api.Command['cert_show'](sn)['result']
 assert 'cacn' in res
+assert 'valid_not_before' in res
+assert 'valid_not_after' in res
 
 def test_0009_cert_find(self):
 """
@@ -237,6 +239,8 @@ def test_0009_cert_find(self):
 res = api.Command['cert_find'](min_serial_number=sn,
max_serial_number=sn)['result'][0]
 assert 'cacn' in res
+assert 'valid_not_before' in res
+assert 'valid_not_after' in res
 
 def test_00010_cleanup(self):
 """
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#181][comment] Tests : User Tracker creation of user with minimal values

2016-10-25 Thread mirielka
  URL: https://github.com/freeipa/freeipa/pull/181
Title: #181: Tests : User Tracker creation of user with minimal values

mirielka commented:
"""
The same minimal values apply for stageuser-add command, can you please modify 
the stageuser tracker as well? Also adding testcases for these changes would be 
nice.
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/181#issuecomment-255951439
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#183][comment] Add __name__ == __main__ guards to setup.pys

2016-10-24 Thread mirielka
  URL: https://github.com/freeipa/freeipa/pull/183
Title: #183: Add __name__ == __main__ guards to setup.pys

mirielka commented:
"""
Thanks, this fixes setup.py related failure in intree tests.
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/183#issuecomment-255745533
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#165][comment] Tests: Verify that cert-find show CA without --all

2016-10-18 Thread mirielka
  URL: https://github.com/freeipa/freeipa/pull/165
Title: #165: Tests: Verify that cert-find show CA without --all

mirielka commented:
"""
Sorry for that, I created new ticket and changed commit message.
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/165#issuecomment-254712487
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#165][synchronized] Tests: Verify that cert-find show CA without --all

2016-10-18 Thread mirielka
   URL: https://github.com/freeipa/freeipa/pull/165
Author: mirielka
 Title: #165: Tests: Verify that cert-find show CA without --all
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/165/head:pr165
git checkout pr165
From 68833d37041b152947382b699938dba02ef8041c Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Fri, 14 Oct 2016 11:56:21 +0200
Subject: [PATCH] Tests: Verify that cert commands show CA without --all

Verify that command cert-find, cert-show and cert-request show CA even without
--all.

https://fedorahosted.org/freeipa/ticket/6410
---
 ipatests/test_xmlrpc/test_cert_plugin.py | 18 +-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/ipatests/test_xmlrpc/test_cert_plugin.py b/ipatests/test_xmlrpc/test_cert_plugin.py
index cb5175d..bac3e94 100644
--- a/ipatests/test_xmlrpc/test_cert_plugin.py
+++ b/ipatests/test_xmlrpc/test_cert_plugin.py
@@ -165,6 +165,7 @@ def test_0002_cert_add(self):
 csr = unicode(self.generateCSR(str(self.subject)))
 res = api.Command['cert_request'](csr, principal=self.service_princ, add=True)['result']
 assert DN(res['subject']) == self.subject
+assert 'cacn' in res
 # save the cert for the service_show/find tests
 cert = res['certificate'].encode('ascii')
 # save cert's SN for URI test
@@ -222,7 +223,22 @@ def test_0007_service_show(self):
 )
 assert set(certs_encoded) == set([cert, newcert])
 
-def test_0008_cleanup(self):
+def test_0008_cert_show(self):
+"""
+Verify that cert-show shows CA of the certificate without --all
+"""
+res = api.Command['cert_show'](sn)['result']
+assert 'cacn' in res
+
+def test_0009_cert_find(self):
+"""
+Verify that cert-find shows CA of the certificate without --all
+"""
+res = api.Command['cert_find'](min_serial_number=sn,
+   max_serial_number=sn)['result'][0]
+assert 'cacn' in res
+
+def test_00010_cleanup(self):
 """
 Clean up cert test data
 """
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#165][comment] Tests: Verify that cert-find show CA without --all

2016-10-17 Thread mirielka
  URL: https://github.com/freeipa/freeipa/pull/165
Title: #165: Tests: Verify that cert-find show CA without --all

mirielka commented:
"""
I added check for cert-show and cert-request (it was quite easy to add it to 
existing test). I'd prefer to add test for #6022 separately when bugfix is 
provided.
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/165#issuecomment-254157384
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#165][synchronized] Tests: Verify that cert-find show CA without --all

2016-10-17 Thread mirielka
   URL: https://github.com/freeipa/freeipa/pull/165
Author: mirielka
 Title: #165: Tests: Verify that cert-find show CA without --all
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/165/head:pr165
git checkout pr165
From d704b597c1f12a84418b9591abc7f9e4f1c4bb0e Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Fri, 14 Oct 2016 11:56:21 +0200
Subject: [PATCH] Tests: Verify that cert commands show CA without --all

Verify that command cert-find, cert-show and cert-request show CA even without
--all.

https://fedorahosted.org/freeipa/ticket/6151
---
 ipatests/test_xmlrpc/test_cert_plugin.py | 18 +-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/ipatests/test_xmlrpc/test_cert_plugin.py b/ipatests/test_xmlrpc/test_cert_plugin.py
index cb5175d..bac3e94 100644
--- a/ipatests/test_xmlrpc/test_cert_plugin.py
+++ b/ipatests/test_xmlrpc/test_cert_plugin.py
@@ -165,6 +165,7 @@ def test_0002_cert_add(self):
 csr = unicode(self.generateCSR(str(self.subject)))
 res = api.Command['cert_request'](csr, principal=self.service_princ, add=True)['result']
 assert DN(res['subject']) == self.subject
+assert 'cacn' in res
 # save the cert for the service_show/find tests
 cert = res['certificate'].encode('ascii')
 # save cert's SN for URI test
@@ -222,7 +223,22 @@ def test_0007_service_show(self):
 )
 assert set(certs_encoded) == set([cert, newcert])
 
-def test_0008_cleanup(self):
+def test_0008_cert_show(self):
+"""
+Verify that cert-show shows CA of the certificate without --all
+"""
+res = api.Command['cert_show'](sn)['result']
+assert 'cacn' in res
+
+def test_0009_cert_find(self):
+"""
+Verify that cert-find shows CA of the certificate without --all
+"""
+res = api.Command['cert_find'](min_serial_number=sn,
+   max_serial_number=sn)['result'][0]
+assert 'cacn' in res
+
+def test_00010_cleanup(self):
 """
 Clean up cert test data
 """
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#165][synchronized] Tests: Verify that cert-find show CA without --all

2016-10-17 Thread mirielka
   URL: https://github.com/freeipa/freeipa/pull/165
Author: mirielka
 Title: #165: Tests: Verify that cert-find show CA without --all
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/165/head:pr165
git checkout pr165
From 41dee6b75d0e76a7c889c52d38bec9dc4c748943 Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Fri, 14 Oct 2016 11:56:21 +0200
Subject: [PATCH] Tests: Verify that cert commands show CA without --all

Verify that command cert-find, cert-show and cert-request show CA even without
--all.

https://fedorahosted.org/freeipa/ticket/6151
---
 ipatests/test_xmlrpc/test_cert_plugin.py | 17 -
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/ipatests/test_xmlrpc/test_cert_plugin.py b/ipatests/test_xmlrpc/test_cert_plugin.py
index cb5175d..f1324cc 100644
--- a/ipatests/test_xmlrpc/test_cert_plugin.py
+++ b/ipatests/test_xmlrpc/test_cert_plugin.py
@@ -165,6 +165,7 @@ def test_0002_cert_add(self):
 csr = unicode(self.generateCSR(str(self.subject)))
 res = api.Command['cert_request'](csr, principal=self.service_princ, add=True)['result']
 assert DN(res['subject']) == self.subject
+assert 'cacn' in res
 # save the cert for the service_show/find tests
 cert = res['certificate'].encode('ascii')
 # save cert's SN for URI test
@@ -222,7 +223,21 @@ def test_0007_service_show(self):
 )
 assert set(certs_encoded) == set([cert, newcert])
 
-def test_0008_cleanup(self):
+def test_0008_cert_show(self):
+"""
+Verify that cert-show shows CA of the certificate without --all
+"""
+res = api.Command['cert_show'](sn)['result']
+assert 'cacn' in res
+
+def test_0009_cert_find(self):
+"""
+Verify that cert-find shows CA of the certificate without --all
+"""
+res = api.Command['cert_find'](min_serial_number=sn, max_serial_number=sn)['result'][0]
+assert 'cacn' in res
+
+def test_00010_cleanup(self):
 """
 Clean up cert test data
 """
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#165][opened] Tests: Verify that cert-find show CA without --all

2016-10-14 Thread mirielka
   URL: https://github.com/freeipa/freeipa/pull/165
Author: mirielka
 Title: #165: Tests: Verify that cert-find show CA without --all
Action: opened

PR body:
"""
https://fedorahosted.org/freeipa/ticket/6151
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/165/head:pr165
git checkout pr165
From e87e74ec6a1c77c1dda34d9d876ca5b997a12bc9 Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Fri, 14 Oct 2016 11:56:21 +0200
Subject: [PATCH] Tests: Verify that cert-find show CA without --all

https://fedorahosted.org/freeipa/ticket/6151
---
 ipatests/test_xmlrpc/test_cert_plugin.py | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/ipatests/test_xmlrpc/test_cert_plugin.py b/ipatests/test_xmlrpc/test_cert_plugin.py
index cb5175d..dbd2c5a 100644
--- a/ipatests/test_xmlrpc/test_cert_plugin.py
+++ b/ipatests/test_xmlrpc/test_cert_plugin.py
@@ -222,7 +222,14 @@ def test_0007_service_show(self):
 )
 assert set(certs_encoded) == set([cert, newcert])
 
-def test_0008_cleanup(self):
+def test_0008_cert_find(self):
+"""
+Verify that cert-find shows CA of the certificate without --all
+"""
+res = api.Command['cert_find'](min_serial_number=sn, max_serial_number=sn)['result'][0]
+assert 'cacn' in res
+
+def test_0009_cleanup(self):
 """
 Clean up cert test data
 """
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#164][comment] Trust AD cleanup

2016-10-14 Thread mirielka
  URL: https://github.com/freeipa/freeipa/pull/164
Title: #164: Trust AD cleanup

mirielka commented:
"""
Thanks for suggestion, I added separate commit for this.
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/164#issuecomment-253735992
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#164][synchronized] Trust AD cleanup

2016-10-14 Thread mirielka
   URL: https://github.com/freeipa/freeipa/pull/164
Author: mirielka
 Title: #164: Trust AD cleanup
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/164/head:pr164
git checkout pr164
From 3da23743777aece50c2dca3c4a29b1112a339b76 Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Thu, 6 Oct 2016 07:44:47 +0200
Subject: [PATCH 1/3] Tests: Provide AD cleanup for trust tests

Providing cleanup of trust information from AD machines for trusts tests.

https://fedorahosted.org/freeipa/ticket/6396
---
 ipatests/test_integration/tasks.py  | 11 +++
 ipatests/test_integration/test_trust.py |  3 +++
 2 files changed, 14 insertions(+)

diff --git a/ipatests/test_integration/tasks.py b/ipatests/test_integration/tasks.py
index 6c26626..23ac426 100644
--- a/ipatests/test_integration/tasks.py
+++ b/ipatests/test_integration/tasks.py
@@ -517,6 +517,17 @@ def remove_trust_with_ad(master, ad_domain):
 range_name = ad_domain.upper() + '_id_range'
 master.run_command(['ipa', 'idrange-del', range_name])
 
+remove_trust_info_from_ad(master, ad_domain)
+
+
+def remove_trust_info_from_ad(master, ad_domain):
+# Remove record about trust from AD
+master.run_command(['rpcclient', ad_domain,
+'-U\\Administrator%{}'.format(
+master.config.ad_admin_password),
+'-c', 'deletetrustdom {}'.format(master.domain.name)],
+   raiseonerr=False)
+
 
 def configure_auth_to_local_rule(master, ad):
 """
diff --git a/ipatests/test_integration/test_trust.py b/ipatests/test_integration/test_trust.py
index 6b30338..27c0e56 100644
--- a/ipatests/test_integration/test_trust.py
+++ b/ipatests/test_integration/test_trust.py
@@ -35,6 +35,9 @@ class ADTrustBase(IntegrationTest):
 
 @classmethod
 def install(cls, mh):
+if not cls.master.transport.file_exists('/usr/bin/rpcclient'):
+raise nose.SkipTest("Package samba-client not available "
+"on {}".format(cls.master.hostname))
 super(ADTrustBase, cls).install(mh)
 cls.ad = cls.ad_domains[0].ads[0]
 cls.ad_domain = cls.ad.domain.name

From 663c6847fa864719d9f89c4b0603953f18539a12 Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Fri, 14 Oct 2016 08:04:43 +0200
Subject: [PATCH 2/3] Tests: Provide AD cleanup for legacy client tests

Providing cleanup of trust information from AD machines for legacy client tests.

https://fedorahosted.org/freeipa/ticket/6396
---
 ipatests/test_integration/test_legacy_clients.py | 4 
 1 file changed, 4 insertions(+)

diff --git a/ipatests/test_integration/test_legacy_clients.py b/ipatests/test_integration/test_legacy_clients.py
index 8380e50..33958a2 100644
--- a/ipatests/test_integration/test_legacy_clients.py
+++ b/ipatests/test_integration/test_legacy_clients.py
@@ -368,6 +368,10 @@ def uninstall(cls, mh):
 cls.master.run_command(['ipa', 'user-del', 'disabledipauser'],
 raiseonerr=False)
 
+# Remove information about trust from AD, if domain was defined
+if hasattr(cls, 'ad_domain'):
+tasks.remove_trust_info_from_ad(cls.master, cls.ad_domain)
+
 # Also unapply fixes on the legacy client, if defined
 if hasattr(cls, 'legacy_client'):
 tasks.unapply_fixes(cls.legacy_client)

From bf61772e0814abe617d6ee6628f3296093180ba7 Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Fri, 14 Oct 2016 10:06:27 +0200
Subject: [PATCH 3/3] Add file_exists method as a member of transport object

Method file_exists is reported by pylint as not being a member of transport
object, however it is used as such. Adding the method to object to avoid pylint
errors or unnecessary pylint disable.

https://fedorahosted.org/freeipa/ticket/6400
---
 pylint_plugins.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pylint_plugins.py b/pylint_plugins.py
index bf35773..fc2ce9b 100644
--- a/pylint_plugins.py
+++ b/pylint_plugins.py
@@ -237,7 +237,7 @@ def fake_class(name_or_class_obj, members=()):
 'stderr_text',
 'returncode',
 ]},
-{'transport': ['put_file']},
+{'transport': ['put_file', 'file_exists']},
 'put_file_contents',
 'get_file_contents',
 'ldap_connect',
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#164][synchronized] Trust AD cleanup

2016-10-14 Thread mirielka
   URL: https://github.com/freeipa/freeipa/pull/164
Author: mirielka
 Title: #164: Trust AD cleanup
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/164/head:pr164
git checkout pr164
From 3da23743777aece50c2dca3c4a29b1112a339b76 Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Thu, 6 Oct 2016 07:44:47 +0200
Subject: [PATCH 1/2] Tests: Provide AD cleanup for trust tests

Providing cleanup of trust information from AD machines for trusts tests.

https://fedorahosted.org/freeipa/ticket/6396
---
 ipatests/test_integration/tasks.py  | 11 +++
 ipatests/test_integration/test_trust.py |  3 +++
 2 files changed, 14 insertions(+)

diff --git a/ipatests/test_integration/tasks.py b/ipatests/test_integration/tasks.py
index 6c26626..23ac426 100644
--- a/ipatests/test_integration/tasks.py
+++ b/ipatests/test_integration/tasks.py
@@ -517,6 +517,17 @@ def remove_trust_with_ad(master, ad_domain):
 range_name = ad_domain.upper() + '_id_range'
 master.run_command(['ipa', 'idrange-del', range_name])
 
+remove_trust_info_from_ad(master, ad_domain)
+
+
+def remove_trust_info_from_ad(master, ad_domain):
+# Remove record about trust from AD
+master.run_command(['rpcclient', ad_domain,
+'-U\\Administrator%{}'.format(
+master.config.ad_admin_password),
+'-c', 'deletetrustdom {}'.format(master.domain.name)],
+   raiseonerr=False)
+
 
 def configure_auth_to_local_rule(master, ad):
 """
diff --git a/ipatests/test_integration/test_trust.py b/ipatests/test_integration/test_trust.py
index 6b30338..27c0e56 100644
--- a/ipatests/test_integration/test_trust.py
+++ b/ipatests/test_integration/test_trust.py
@@ -35,6 +35,9 @@ class ADTrustBase(IntegrationTest):
 
 @classmethod
 def install(cls, mh):
+if not cls.master.transport.file_exists('/usr/bin/rpcclient'):
+raise nose.SkipTest("Package samba-client not available "
+"on {}".format(cls.master.hostname))
 super(ADTrustBase, cls).install(mh)
 cls.ad = cls.ad_domains[0].ads[0]
 cls.ad_domain = cls.ad.domain.name

From 663c6847fa864719d9f89c4b0603953f18539a12 Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Fri, 14 Oct 2016 08:04:43 +0200
Subject: [PATCH 2/2] Tests: Provide AD cleanup for legacy client tests

Providing cleanup of trust information from AD machines for legacy client tests.

https://fedorahosted.org/freeipa/ticket/6396
---
 ipatests/test_integration/test_legacy_clients.py | 4 
 1 file changed, 4 insertions(+)

diff --git a/ipatests/test_integration/test_legacy_clients.py b/ipatests/test_integration/test_legacy_clients.py
index 8380e50..33958a2 100644
--- a/ipatests/test_integration/test_legacy_clients.py
+++ b/ipatests/test_integration/test_legacy_clients.py
@@ -368,6 +368,10 @@ def uninstall(cls, mh):
 cls.master.run_command(['ipa', 'user-del', 'disabledipauser'],
 raiseonerr=False)
 
+# Remove information about trust from AD, if domain was defined
+if hasattr(cls, 'ad_domain'):
+tasks.remove_trust_info_from_ad(cls.master, cls.ad_domain)
+
 # Also unapply fixes on the legacy client, if defined
 if hasattr(cls, 'legacy_client'):
 tasks.unapply_fixes(cls.legacy_client)
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#164][opened] Trust AD cleanup

2016-10-14 Thread mirielka
   URL: https://github.com/freeipa/freeipa/pull/164
Author: mirielka
 Title: #164: Trust AD cleanup
Action: opened

PR body:
"""
Adding operations that remove test related trust information from AD machines.
Package samba-client is necessary for this operation, hence tests are skipped 
if the package is not installed.
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/164/head:pr164
git checkout pr164
From 4ac9457ea602eb06e7c077b075a20b198b69ee03 Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Thu, 6 Oct 2016 07:44:47 +0200
Subject: [PATCH 1/2] Tests: Provide AD cleanup for trust tests

Providing cleanup of trust information from AD machines for trusts tests.

https://fedorahosted.org/freeipa/ticket/6396
---
 ipatests/test_integration/tasks.py  | 10 ++
 ipatests/test_integration/test_trust.py |  3 +++
 2 files changed, 13 insertions(+)

diff --git a/ipatests/test_integration/tasks.py b/ipatests/test_integration/tasks.py
index 6c26626..7dbde3d 100644
--- a/ipatests/test_integration/tasks.py
+++ b/ipatests/test_integration/tasks.py
@@ -517,6 +517,16 @@ def remove_trust_with_ad(master, ad_domain):
 range_name = ad_domain.upper() + '_id_range'
 master.run_command(['ipa', 'idrange-del', range_name])
 
+remove_trust_info_from_ad(master, ad_domain)
+
+def remove_trust_info_from_ad(master, ad_domain):
+# Remove record about trust from AD
+master.run_command(['rpcclient', ad_domain,
+'-U\\Administrator%{}'.format(
+master.config.ad_admin_password),
+'-c', 'deletetrustdom {}'.format(master.domain.name)],
+   raiseonerr=False)
+
 
 def configure_auth_to_local_rule(master, ad):
 """
diff --git a/ipatests/test_integration/test_trust.py b/ipatests/test_integration/test_trust.py
index 6b30338..27c0e56 100644
--- a/ipatests/test_integration/test_trust.py
+++ b/ipatests/test_integration/test_trust.py
@@ -35,6 +35,9 @@ class ADTrustBase(IntegrationTest):
 
 @classmethod
 def install(cls, mh):
+if not cls.master.transport.file_exists('/usr/bin/rpcclient'):
+raise nose.SkipTest("Package samba-client not available "
+"on {}".format(cls.master.hostname))
 super(ADTrustBase, cls).install(mh)
 cls.ad = cls.ad_domains[0].ads[0]
 cls.ad_domain = cls.ad.domain.name

From e2b5bddd08e2f5ef905199f5d692673e552e0bc1 Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Fri, 14 Oct 2016 08:04:43 +0200
Subject: [PATCH 2/2] Tests: Provide AD cleanup for legacy client tests

Providing cleanup of trust information from AD machines for legacy client tests.

https://fedorahosted.org/freeipa/ticket/6396
---
 ipatests/test_integration/test_legacy_clients.py | 4 
 1 file changed, 4 insertions(+)

diff --git a/ipatests/test_integration/test_legacy_clients.py b/ipatests/test_integration/test_legacy_clients.py
index 8380e50..33958a2 100644
--- a/ipatests/test_integration/test_legacy_clients.py
+++ b/ipatests/test_integration/test_legacy_clients.py
@@ -368,6 +368,10 @@ def uninstall(cls, mh):
 cls.master.run_command(['ipa', 'user-del', 'disabledipauser'],
 raiseonerr=False)
 
+# Remove information about trust from AD, if domain was defined
+if hasattr(cls, 'ad_domain'):
+tasks.remove_trust_info_from_ad(cls.master, cls.ad_domain)
+
 # Also unapply fixes on the legacy client, if defined
 if hasattr(cls, 'legacy_client'):
 tasks.unapply_fixes(cls.legacy_client)
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#154][opened] [ipa-4-4] Rebase: Tests: Fix cert revocation tests

2016-10-12 Thread mirielka
   URL: https://github.com/freeipa/freeipa/pull/154
Author: mirielka
 Title: #154: [ipa-4-4] Rebase: Tests: Fix cert revocation tests
Action: opened

PR body:
"""

"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/154/head:pr154
git checkout pr154
From e6558c65188d1fa5003de24e29e64ea6be0f2bfb Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Thu, 6 Oct 2016 08:51:03 +0200
Subject: [PATCH 1/2] Tests: Remove invalid certplugin tests

A bunch of certplugin tests were testing number of revoked certificates with
various revocation reasons. Since existence of revoked certificates often
depends on other parts of IdM than IPA, it is not really valid to check their
presence unless creation of revoked certificate is intentionally tested.

https://fedorahosted.org/freeipa/ticket/6349
---
 ipatests/test_xmlrpc/test_cert_plugin.py | 75 +---
 1 file changed, 1 insertion(+), 74 deletions(-)

diff --git a/ipatests/test_xmlrpc/test_cert_plugin.py b/ipatests/test_xmlrpc/test_cert_plugin.py
index 2598e0b..70cef5d 100644
--- a/ipatests/test_xmlrpc/test_cert_plugin.py
+++ b/ipatests/test_xmlrpc/test_cert_plugin.py
@@ -296,80 +296,7 @@ def test_0006_find_this_short_host_exact(self):
 res = api.Command['cert_find'](subject=self.short, exactly=True)
 assert 'count' in res and res['count'] == 0
 
-def test_0007_find_revocation_reason_0(self):
-"""
-Find all certificates with revocation reason 0
-"""
-res = api.Command['cert_find'](revocation_reason=0)
-assert 'count' in res and res['count'] == 0
-
-def test_0008_find_revocation_reason_1(self):
-"""
-Find all certificates with revocation reason 1
-"""
-res = api.Command['cert_find'](revocation_reason=1)
-assert 'count' in res and res['count'] == 0
-
-def test_0009_find_revocation_reason_2(self):
-"""
-Find all certificates with revocation reason 2
-"""
-res = api.Command['cert_find'](revocation_reason=2)
-assert 'count' in res and res['count'] == 0
-
-def test_0010_find_revocation_reason_3(self):
-"""
-Find all certificates with revocation reason 3
-"""
-res = api.Command['cert_find'](revocation_reason=3)
-assert 'count' in res and res['count'] == 0
-
-def test_0011_find_revocation_reason_4(self):
-"""
-Find all certificates with revocation reason 4
-
-There is no way to know in advance how many revoked certificates
-we'll have but in the context of make-test we'll have at least one.
-"""
-res = api.Command['cert_find'](revocation_reason=4)
-assert 'count' in res and res['count'] >= 1
-
-def test_0012_find_revocation_reason_5(self):
-"""
-Find all certificates with revocation reason 5
-"""
-res = api.Command['cert_find'](revocation_reason=5)
-assert 'count' in res and res['count'] == 0
-
-def test_0013_find_revocation_reason_6(self):
-"""
-Find all certificates with revocation reason 6
-"""
-res = api.Command['cert_find'](revocation_reason=6)
-assert 'count' in res and res['count'] == 0
-
-# There is no revocation reason #7
-
-def test_0014_find_revocation_reason_8(self):
-"""
-Find all certificates with revocation reason 8
-"""
-res = api.Command['cert_find'](revocation_reason=8)
-assert 'count' in res and res['count'] == 0
-
-def test_0015_find_revocation_reason_9(self):
-"""
-Find all certificates with revocation reason 9
-"""
-res = api.Command['cert_find'](revocation_reason=9)
-assert 'count' in res and res['count'] == 0
-
-def test_0016_find_revocation_reason_10(self):
-"""
-Find all certificates with revocation reason 10
-"""
-res = api.Command['cert_find'](revocation_reason=10)
-assert 'count' in res and res['count'] == 0
+# tests 0007 to 0016 removed
 
 def test_0017_find_by_issuedon(self):
 """

From a9050a73d0d76917b689f27670455855cca9f6c8 Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Tue, 11 Oct 2016 11:33:16 +0200
Subject: [PATCH 2/2] Tests: Certificate revocation

Providing tests for certificate revocation to replace deleted tests from
test_cert_find.

https://fedorahosted.org/freeipa/ticket/6349
---
 ipatests/test_xmlrpc/test_cert_plugin.py | 80 ++

[Freeipa-devel] [freeipa PR#140][synchronized] Tests: Remove invalid certplugin tests

2016-10-11 Thread mirielka
   URL: https://github.com/freeipa/freeipa/pull/140
Author: mirielka
 Title: #140: Tests: Remove invalid certplugin tests
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/140/head:pr140
git checkout pr140
From b6afcc5b56f471b06fdd64a0c1e0d996b4a07f08 Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Thu, 6 Oct 2016 08:51:03 +0200
Subject: [PATCH 1/2] Tests: Remove invalid certplugin tests

A bunch of certplugin tests were testing number of revoked certificates with
various revocation reasons. Since existence of revoked certificates often
depends on other parts of IdM than IPA, it is not really valid to check their
presence unless creation of revoked certificate is intentionally tested.

https://fedorahosted.org/freeipa/ticket/6349
---
 ipatests/test_xmlrpc/test_cert_plugin.py | 75 +---
 1 file changed, 1 insertion(+), 74 deletions(-)

diff --git a/ipatests/test_xmlrpc/test_cert_plugin.py b/ipatests/test_xmlrpc/test_cert_plugin.py
index 4537002..e527886 100644
--- a/ipatests/test_xmlrpc/test_cert_plugin.py
+++ b/ipatests/test_xmlrpc/test_cert_plugin.py
@@ -292,80 +292,7 @@ def test_0006_find_this_short_host_exact(self):
 res = api.Command['cert_find'](subject=self.short, exactly=True)
 assert 'count' in res and res['count'] == 0
 
-def test_0007_find_revocation_reason_0(self):
-"""
-Find all certificates with revocation reason 0
-"""
-res = api.Command['cert_find'](revocation_reason=0)
-assert 'count' in res and res['count'] == 0
-
-def test_0008_find_revocation_reason_1(self):
-"""
-Find all certificates with revocation reason 1
-"""
-res = api.Command['cert_find'](revocation_reason=1)
-assert 'count' in res and res['count'] == 0
-
-def test_0009_find_revocation_reason_2(self):
-"""
-Find all certificates with revocation reason 2
-"""
-res = api.Command['cert_find'](revocation_reason=2)
-assert 'count' in res and res['count'] == 0
-
-def test_0010_find_revocation_reason_3(self):
-"""
-Find all certificates with revocation reason 3
-"""
-res = api.Command['cert_find'](revocation_reason=3)
-assert 'count' in res and res['count'] == 0
-
-def test_0011_find_revocation_reason_4(self):
-"""
-Find all certificates with revocation reason 4
-
-There is no way to know in advance how many revoked certificates
-we'll have but in the context of make-test we'll have at least one.
-"""
-res = api.Command['cert_find'](revocation_reason=4)
-assert 'count' in res and res['count'] >= 1
-
-def test_0012_find_revocation_reason_5(self):
-"""
-Find all certificates with revocation reason 5
-"""
-res = api.Command['cert_find'](revocation_reason=5)
-assert 'count' in res and res['count'] == 0
-
-def test_0013_find_revocation_reason_6(self):
-"""
-Find all certificates with revocation reason 6
-"""
-res = api.Command['cert_find'](revocation_reason=6)
-assert 'count' in res and res['count'] == 0
-
-# There is no revocation reason #7
-
-def test_0014_find_revocation_reason_8(self):
-"""
-Find all certificates with revocation reason 8
-"""
-res = api.Command['cert_find'](revocation_reason=8)
-assert 'count' in res and res['count'] == 0
-
-def test_0015_find_revocation_reason_9(self):
-"""
-Find all certificates with revocation reason 9
-"""
-res = api.Command['cert_find'](revocation_reason=9)
-assert 'count' in res and res['count'] == 0
-
-def test_0016_find_revocation_reason_10(self):
-"""
-Find all certificates with revocation reason 10
-"""
-res = api.Command['cert_find'](revocation_reason=10)
-assert 'count' in res and res['count'] == 0
+# tests 0007 to 0016 removed
 
 def test_0017_find_by_issuedon(self):
 """

From 0232ec23bcbc23c4cccdeef1dc20e75839c5832c Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Tue, 11 Oct 2016 11:33:16 +0200
Subject: [PATCH 2/2] Tests: Certificate revocation

Providing tests for certificate revocation to replace deleted tests from
test_cert_find.

https://fedorahosted.org/freeipa/ticket/6349
---
 ipatests/test_xmlrpc/test_cert_plugin.py | 80 ++--
 1 file changed, 75 insertions(+), 5 deletions(-)

diff -

[Freeipa-devel] [freeipa PR#140][comment] Tests: Remove invalid certplugin tests

2016-10-06 Thread mirielka
  URL: https://github.com/freeipa/freeipa/pull/140
Title: #140: Tests: Remove invalid certplugin tests

mirielka commented:
"""
Ok, I will do it like Ales proposed and will sync this PR when new tests are 
ready.
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/140#issuecomment-251934592
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#141][opened] Tests: Fix failing test_ipalib/test_parameters

2016-10-06 Thread mirielka
   URL: https://github.com/freeipa/freeipa/pull/141
Author: mirielka
 Title: #141: Tests: Fix failing test_ipalib/test_parameters
Action: opened

PR body:
"""
Parameters test fails because of KeyError caused by improper manipulation with
kwargs in Param.__init__ method. During initialization, if kwargs['required']
or kwargs['multivalue'] is None, it is delete from dictionary and hence the
missing key. Small change of the condition prevents this from happening.

Partially fixes https://fedorahosted.org/freeipa/ticket/6292
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/141/head:pr141
git checkout pr141
From a6f076cac03e3672399abccf0639b0d6035147b6 Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Thu, 6 Oct 2016 10:54:07 +0200
Subject: [PATCH] Tests: Fix failing test_ipalib/test_parameters

Parameters test fails because of KeyError caused by improper manipulation with
kwargs in Param.__init__ method. During initialization, if kwargs['required']
or kwargs['multivalue'] is None, it is delete from dictionary and hence the
missing key. Small change of the condition prevents this from happening.

Partially fixes https://fedorahosted.org/freeipa/ticket/6292
---
 ipalib/parameters.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipalib/parameters.py b/ipalib/parameters.py
index 77a6136..32ff9a8 100644
--- a/ipalib/parameters.py
+++ b/ipalib/parameters.py
@@ -473,7 +473,7 @@ def __init__(self, name, *rules, **kw):
 CALLABLE_ERROR % (key, value, type(value))
 )
 kw[key] = value
-else:
+elif key not in ('required', 'multivalue'):
 kw.pop(key, None)
 
 # We keep these values to use in __repr__():
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#140][comment] Tests: Remove invalid certplugin tests

2016-10-06 Thread mirielka
  URL: https://github.com/freeipa/freeipa/pull/140
Title: #140: Tests: Remove invalid certplugin tests

mirielka commented:
"""
Hi, I discussed this with Rob who authored the tests and he said that these 
tests were there just as a kind of checking that no extra revoked certificates 
get in. Tests are cca 4 years old, revoked certificates do get in e.g. due to 
changes in Dogtag (they can be created by other tests and can't be deleted) and 
cert tests fail. Creating new tests as you described (create cert, revoke it 
and check it's in the database with correct info) could be separate task, since 
these tests didn't do such think, they just checked what's already in 
regardless of how it got there.
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/140#issuecomment-251887928
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#140][opened] Tests: Remove invalid certplugin tests

2016-10-06 Thread mirielka
   URL: https://github.com/freeipa/freeipa/pull/140
Author: mirielka
 Title: #140: Tests: Remove invalid certplugin tests
Action: opened

PR body:
"""
A bunch of certplugin tests were testing number of revoked certificates with
various revocation reasons. Since existence of revoked certificates often
depends on other parts of IdM than IPA, it is not really valid to check their
presence unless creation of revoked certificate is intentionally tested.

https://fedorahosted.org/freeipa/ticket/6349
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/140/head:pr140
git checkout pr140
From b6afcc5b56f471b06fdd64a0c1e0d996b4a07f08 Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Thu, 6 Oct 2016 08:51:03 +0200
Subject: [PATCH] Tests: Remove invalid certplugin tests

A bunch of certplugin tests were testing number of revoked certificates with
various revocation reasons. Since existence of revoked certificates often
depends on other parts of IdM than IPA, it is not really valid to check their
presence unless creation of revoked certificate is intentionally tested.

https://fedorahosted.org/freeipa/ticket/6349
---
 ipatests/test_xmlrpc/test_cert_plugin.py | 75 +---
 1 file changed, 1 insertion(+), 74 deletions(-)

diff --git a/ipatests/test_xmlrpc/test_cert_plugin.py b/ipatests/test_xmlrpc/test_cert_plugin.py
index 4537002..e527886 100644
--- a/ipatests/test_xmlrpc/test_cert_plugin.py
+++ b/ipatests/test_xmlrpc/test_cert_plugin.py
@@ -292,80 +292,7 @@ def test_0006_find_this_short_host_exact(self):
 res = api.Command['cert_find'](subject=self.short, exactly=True)
 assert 'count' in res and res['count'] == 0
 
-def test_0007_find_revocation_reason_0(self):
-"""
-Find all certificates with revocation reason 0
-"""
-res = api.Command['cert_find'](revocation_reason=0)
-assert 'count' in res and res['count'] == 0
-
-def test_0008_find_revocation_reason_1(self):
-"""
-Find all certificates with revocation reason 1
-"""
-res = api.Command['cert_find'](revocation_reason=1)
-assert 'count' in res and res['count'] == 0
-
-def test_0009_find_revocation_reason_2(self):
-"""
-Find all certificates with revocation reason 2
-"""
-res = api.Command['cert_find'](revocation_reason=2)
-assert 'count' in res and res['count'] == 0
-
-def test_0010_find_revocation_reason_3(self):
-"""
-Find all certificates with revocation reason 3
-"""
-res = api.Command['cert_find'](revocation_reason=3)
-assert 'count' in res and res['count'] == 0
-
-def test_0011_find_revocation_reason_4(self):
-"""
-Find all certificates with revocation reason 4
-
-There is no way to know in advance how many revoked certificates
-we'll have but in the context of make-test we'll have at least one.
-"""
-res = api.Command['cert_find'](revocation_reason=4)
-assert 'count' in res and res['count'] >= 1
-
-def test_0012_find_revocation_reason_5(self):
-"""
-Find all certificates with revocation reason 5
-"""
-res = api.Command['cert_find'](revocation_reason=5)
-assert 'count' in res and res['count'] == 0
-
-def test_0013_find_revocation_reason_6(self):
-"""
-Find all certificates with revocation reason 6
-"""
-res = api.Command['cert_find'](revocation_reason=6)
-assert 'count' in res and res['count'] == 0
-
-# There is no revocation reason #7
-
-def test_0014_find_revocation_reason_8(self):
-"""
-Find all certificates with revocation reason 8
-"""
-res = api.Command['cert_find'](revocation_reason=8)
-assert 'count' in res and res['count'] == 0
-
-def test_0015_find_revocation_reason_9(self):
-"""
-Find all certificates with revocation reason 9
-"""
-res = api.Command['cert_find'](revocation_reason=9)
-assert 'count' in res and res['count'] == 0
-
-def test_0016_find_revocation_reason_10(self):
-"""
-Find all certificates with revocation reason 10
-"""
-res = api.Command['cert_find'](revocation_reason=10)
-assert 'count' in res and res['count'] == 0
+# tests 0007 to 0016 removed
 
 def test_0017_find_by_issuedon(self):
 """
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#129][+ack] Fix test_util.test_assert_deepequal test

2016-10-03 Thread mirielka
  URL: https://github.com/freeipa/freeipa/pull/129
Title: #129: Fix test_util.test_assert_deepequal test

Label: +ack
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#123][opened] Tests: Remove silent deleting and creating entries by tracker

2016-09-27 Thread mirielka
   URL: https://github.com/freeipa/freeipa/pull/123
Author: mirielka
 Title: #123: Tests: Remove silent deleting and creating entries by tracker
Action: opened

PR body:
"""
https://fedorahosted.org/freeipa/ticket/6123
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/123/head:pr123
git checkout pr123
From 6fd6fcfc282675014e2a4704d4211a2f8e18d8c9 Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Tue, 27 Sep 2016 14:46:32 +0200
Subject: [PATCH] Tests: Remove silent deleting and creating entries by tracker

https://fedorahosted.org/freeipa/ticket/6123
---
 ipatests/test_xmlrpc/test_group_plugin.py | 4 ++--
 ipatests/test_xmlrpc/test_stageuser_plugin.py | 1 +
 ipatests/test_xmlrpc/test_user_plugin.py  | 2 ++
 ipatests/test_xmlrpc/tracker/base.py  | 5 -
 4 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/ipatests/test_xmlrpc/test_group_plugin.py b/ipatests/test_xmlrpc/test_group_plugin.py
index 27a8a33..2f824de 100644
--- a/ipatests/test_xmlrpc/test_group_plugin.py
+++ b/ipatests/test_xmlrpc/test_group_plugin.py
@@ -231,7 +231,7 @@ def test_search_for_all_groups_with_members(self, group, group2):
 def test_search_for_all_groups(self, group, group2):
 """ Search for all groups """
 group.ensure_exists()
-group2.create()
+group2.ensure_exists()
 command = group.make_command('group_find')
 result = command()
 assert_deepequal(dict(
@@ -631,7 +631,7 @@ class TestManagedGroupObjectclasses(XMLRPC_test):
 def test_check_objectclasses_after_detach(self, user, managed_group):
 """ Check objectclasses after user was detached from managed group """
 # https://fedorahosted.org/freeipa/ticket/4909#comment:1
-user.create()
+user.ensure_exists()
 user.run_command('group_detach', *[user.uid])
 managed_group.retrieve(all=True)
 managed_group.add_member(dict(user=user.uid))
diff --git a/ipatests/test_xmlrpc/test_stageuser_plugin.py b/ipatests/test_xmlrpc/test_stageuser_plugin.py
index 34cfaf8..4a859e8 100644
--- a/ipatests/test_xmlrpc/test_stageuser_plugin.py
+++ b/ipatests/test_xmlrpc/test_stageuser_plugin.py
@@ -255,6 +255,7 @@ def test_delete_stageduser(self, stageduser):
 stageduser.delete()
 
 def test_find_stageduser(self, stageduser):
+stageduser.ensure_exists()
 stageduser.find()
 
 def test_findall_stageduser(self, stageduser):
diff --git a/ipatests/test_xmlrpc/test_user_plugin.py b/ipatests/test_xmlrpc/test_user_plugin.py
index 7c27abc..7508578 100644
--- a/ipatests/test_xmlrpc/test_user_plugin.py
+++ b/ipatests/test_xmlrpc/test_user_plugin.py
@@ -177,6 +177,7 @@ def test_rename_nonexistent(self, user, renameduser):
 class TestUser(XMLRPC_test):
 def test_retrieve(self, user):
 """ Create user and try to retrieve it """
+user.ensure_exists()
 user.retrieve()
 
 def test_delete(self, user):
@@ -216,6 +217,7 @@ def test_remove_userclass(self, user):
 class TestFind(XMLRPC_test):
 def test_find(self, user):
 """ Basic check of user-find """
+user.ensure_exists()
 user.find()
 
 def test_find_with_all(self, user):
diff --git a/ipatests/test_xmlrpc/tracker/base.py b/ipatests/test_xmlrpc/tracker/base.py
index ecaadc6..a2b7406 100644
--- a/ipatests/test_xmlrpc/tracker/base.py
+++ b/ipatests/test_xmlrpc/tracker/base.py
@@ -199,7 +199,6 @@ def make_update_command(self, updates):
 
 def create(self):
 """Helper function to create an entry and check the result"""
-self.ensure_missing()
 self.track_create()
 command = self.make_create_command()
 result = command()
@@ -227,7 +226,6 @@ def check_create(self, result):
 
 def delete(self):
 """Helper function to delete a host and check the result"""
-self.ensure_exists()
 self.track_delete()
 command = self.make_delete_command()
 result = command()
@@ -244,7 +242,6 @@ def check_delete(self, result):
 
 def retrieve(self, all=False, raw=False):
 """Helper function to retrieve an entry and check the result"""
-self.ensure_exists()
 command = self.make_retrieve_command(all=all, raw=raw)
 result = command()
 self.check_retrieve(result, all=all, raw=raw)
@@ -255,7 +252,6 @@ def check_retrieve(self, result, all=False, raw=False):
 
 def find(self, all=False, raw=False):
 """Helper function to search for this hosts and check the result"""
-self.ensure_exists()
 command = self.make_find_command(self.name, all=all, raw

[Freeipa-devel] [freeipa PR#119][opened] Tests: Providing trust tests with tree root domain

2016-09-26 Thread mirielka
   URL: https://github.com/freeipa/freeipa/pull/119
Author: mirielka
 Title: #119: Tests: Providing trust tests with tree root domain
Action: opened

PR body:
"""
https://fedorahosted.org/freeipa/ticket/6347
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/119/head:pr119
git checkout pr119
From 95568636efffdb2fa00df17291f2b1aed90cf769 Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Thu, 22 Sep 2016 14:09:03 +0200
Subject: [PATCH] Tests: Providing trust tests with tree root domain

https://fedorahosted.org/freeipa/ticket/6347
---
 ipatests/pytest_plugins/integration.py  |   2 +-
 ipatests/test_integration/test_trust.py | 110 
 2 files changed, 97 insertions(+), 15 deletions(-)

diff --git a/ipatests/pytest_plugins/integration.py b/ipatests/pytest_plugins/integration.py
index 63d0c99..bd44f16 100644
--- a/ipatests/pytest_plugins/integration.py
+++ b/ipatests/pytest_plugins/integration.py
@@ -173,7 +173,7 @@ def mh(request, class_integration_logs):
 for i in range(cls.num_ad_domains):
 domain_descriptions.append({
 'type': 'AD',
-'hosts': {'ad': 1, 'ad_subdomain': 1},
+'hosts': {'ad': 1, 'ad_subdomain': 1, 'ad_treedomain': 1},
 })
 
 mh = make_multihost_fixture(
diff --git a/ipatests/test_integration/test_trust.py b/ipatests/test_integration/test_trust.py
index 6b30338..dc7cf28 100644
--- a/ipatests/test_integration/test_trust.py
+++ b/ipatests/test_integration/test_trust.py
@@ -31,7 +31,7 @@ class ADTrustBase(IntegrationTest):
 
 topology = 'line'
 num_ad_domains = 1
-optional_extra_roles = ['ad_subdomain']
+optional_extra_roles = ['ad_subdomain', 'ad_treedomain']
 
 @classmethod
 def install(cls, mh):
@@ -49,6 +49,14 @@ def install(cls, mh):
 except LookupError:
 cls.ad_subdomain = None
 
+# Determine whether the tree domain AD is available
+try:
+cls.tree_ad = cls.host_by_role(cls.optional_extra_roles[1])
+cls.ad_treedomain = '.'.join(
+cls.tree_ad.hostname.split('.')[1:])
+except LookupError:
+cls.ad_treedomain = None
+
 cls.configure_dns_and_time()
 
 @classmethod
@@ -95,9 +103,10 @@ def test_all_trustdomains_found(self):
   'trustdomain-find',
   self.ad_domain])
 
-# Check that both trustdomains appear in the result
+# Check that all trustdomains appear in the result
 assert self.ad_domain in result.stdout_text
 assert self.ad_subdomain in result.stdout_text
+assert self.ad_treedomain in result.stdout_text
 
 
 class ADTrustSubdomainBase(ADTrustBase):
@@ -113,20 +122,26 @@ def configure_dns_and_time(cls):
 @classmethod
 def install(cls, mh):
 super(ADTrustSubdomainBase, cls).install(mh)
-cls.ad = cls.ad_domains[0].ads[0]
-cls.ad_domain = cls.ad.domain.name
-cls.install_adtrust()
-cls.check_sid_generation()
-
-# Determine whether the subdomain AD is available
-# if not, skip the whole suite
-try:
-cls.child_ad = cls.host_by_role(cls.optional_extra_roles[0])
-cls.ad_subdomain = '.'.join(cls.child_ad.hostname.split('.')[1:])
-except LookupError:
+if not cls.ad_subdomain:
 raise nose.SkipTest('AD subdomain is not available.')
 
-cls.configure_dns_and_time()
+
+class ADTrustTreedomainBase(ADTrustBase):
+"""
+Base class for tests involving tree root domains of trusted forests
+"""
+
+@classmethod
+def configure_dns_and_time(cls):
+tasks.configure_dns_for_trust(cls.master, cls.ad_treedomain)
+tasks.sync_time(cls.master, cls.tree_ad)
+
+@classmethod
+def install(cls, mh):
+super(ADTrustTreedomainBase, cls).install(mh)
+if not cls.ad_treedomain:
+raise nose.SkipTest('AD tree root domain is not available.')
+
 
 class TestBasicADTrust(ADTrustBase):
 """Basic Integration test for Active Directory"""
@@ -340,6 +355,73 @@ def test_all_trustdomains_found(self):
 'Test case unapplicable, present for inheritance reason only')
 
 
+class TestExternalTrustWithTreedomain(ADTrustTreedomainBase):
+"""
+Test establishing external trust with tree root domain
+"""
+
+def test_establish_trust(self):
+""" Tests establishing external trust with Active Directory """
+tasks.establish_trust_with_ad(
+self.master, self.ad_treedomain,
+extra_args=['--range-type', 'ipa-ad-trust', '--external=True'])
+
+def tes

[Freeipa-devel] [freeipa PR#110][+ack] test_text: add test ipa.pot file for tests

2016-09-26 Thread mirielka
  URL: https://github.com/freeipa/freeipa/pull/110
Title: #110: test_text: add test ipa.pot file for tests

Label: +ack
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#99][opened] Tests: Remove --force options from tracker base class

2016-09-20 Thread mirielka
   URL: https://github.com/freeipa/freeipa/pull/99
Author: mirielka
 Title: #99: Tests: Remove --force options from tracker base class
Action: opened

PR body:
"""
Removing --force option from tracker base class so it would not be required to
be implemented in every specific tracker, even though it's not necessary.
Modifying existing trackers to reflect this change.

https://fedorahosted.org/freeipa/ticket/6124
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/99/head:pr99
git checkout pr99
From 89408696a956425f844b720d00ef6d2ba002c921 Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Tue, 20 Sep 2016 17:29:02 +0200
Subject: [PATCH] Tests: Remove --force options from tracker base class

Removing --force option from tracker base class so it would not be required to
be implemented in every specific tracker, even though it's not necessary.
Modifying existing trackers to reflect this change.

https://fedorahosted.org/freeipa/ticket/6124
---
 ipatests/test_xmlrpc/test_certprofile_plugin.py | 2 +-
 ipatests/test_xmlrpc/tracker/automember_plugin.py   | 3 +--
 ipatests/test_xmlrpc/tracker/base.py| 8 
 ipatests/test_xmlrpc/tracker/ca_plugin.py   | 2 +-
 ipatests/test_xmlrpc/tracker/caacl_plugin.py| 2 +-
 ipatests/test_xmlrpc/tracker/certprofile_plugin.py  | 2 +-
 ipatests/test_xmlrpc/tracker/group_plugin.py| 2 +-
 ipatests/test_xmlrpc/tracker/host_plugin.py | 8 
 ipatests/test_xmlrpc/tracker/location_plugin.py | 4 ++--
 ipatests/test_xmlrpc/tracker/service_plugin.py  | 8 
 ipatests/test_xmlrpc/tracker/stageuser_plugin.py| 2 +-
 ipatests/test_xmlrpc/tracker/sudocmd_plugin.py  | 2 +-
 ipatests/test_xmlrpc/tracker/sudocmdgroup_plugin.py | 3 +--
 ipatests/test_xmlrpc/tracker/user_plugin.py | 2 +-
 14 files changed, 32 insertions(+), 18 deletions(-)

diff --git a/ipatests/test_xmlrpc/test_certprofile_plugin.py b/ipatests/test_xmlrpc/test_certprofile_plugin.py
index e845977..1b3edda 100644
--- a/ipatests/test_xmlrpc/test_certprofile_plugin.py
+++ b/ipatests/test_xmlrpc/test_certprofile_plugin.py
@@ -128,7 +128,7 @@ class TestProfileCRUD(XMLRPC_test):
 def test_create_duplicate(self, user_profile):
 msg = u'Certificate Profile with name "{}" already exists'
 user_profile.ensure_exists()
-command = user_profile.make_create_command(force=True)
+command = user_profile.make_create_command()
 with raises_exact(errors.DuplicateEntry(
 message=msg.format(user_profile.name))):
 command()
diff --git a/ipatests/test_xmlrpc/tracker/automember_plugin.py b/ipatests/test_xmlrpc/tracker/automember_plugin.py
index 08b17b0..61f87c3 100644
--- a/ipatests/test_xmlrpc/tracker/automember_plugin.py
+++ b/ipatests/test_xmlrpc/tracker/automember_plugin.py
@@ -38,8 +38,7 @@ def __init__(self, groupname, membertype, description=u'Automember desc'):
 self.dn = DN(('cn', self.cn), ('cn', self.membertype.title()),
  ('cn', 'automember'), ('cn', 'etc'), api.env.basedn)
 
-def make_create_command(self,
-force=True, *args, **kwargs):
+def make_create_command(self, *args, **kwargs):
 """ Make function that creates an automember using 'automember-add' """
 return self.make_command('automember_add', self.cn,
  description=self.description,
diff --git a/ipatests/test_xmlrpc/tracker/base.py b/ipatests/test_xmlrpc/tracker/base.py
index f7fc55d..0596448 100644
--- a/ipatests/test_xmlrpc/tracker/base.py
+++ b/ipatests/test_xmlrpc/tracker/base.py
@@ -167,7 +167,7 @@ def ensure_exists(self):
 """If the entry does not exist (according to tracker state), create it
 """
 if not self.exists:
-self.create(force=True)
+self.create()
 
 def ensure_missing(self):
 """If the entry exists (according to tracker state), delete it
@@ -175,7 +175,7 @@ def ensure_missing(self):
 if self.exists:
 self.delete()
 
-def make_create_command(self, force=True):
+def make_create_command(self):
 """Make function that creates the plugin entry object."""
 raise NotImplementedError(self._override_me_msg)
 
@@ -199,11 +199,11 @@ def make_update_command(self, updates):
 """Make function that modifies the entry using ${CMD}_mod"""
 raise NotImplementedError(self._override_me_msg)
 
-def create(self, force=True):
+def create(self):
 """Helper function to create an entry and check the result"""
 self.ensure_missing()
 self.track_create()
-command = sel

[Freeipa-devel] [freeipa PR#95][opened] Tests: Remove unnecessary attributes from base tracker

2016-09-20 Thread mirielka
   URL: https://github.com/freeipa/freeipa/pull/95
Author: mirielka
 Title: #95: Tests: Remove unnecessary attributes from base tracker
Action: opened

PR body:
"""
https://fedorahosted.org/freeipa/ticket/6128
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/95/head:pr95
git checkout pr95
From a26ca3b93101f1d5c29a2a8722f2073092597cb1 Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Tue, 20 Sep 2016 11:11:29 +0200
Subject: [PATCH] Tests: Remove unnecessary attributes from base tracker

https://fedorahosted.org/freeipa/ticket/6128
---
 ipatests/test_xmlrpc/tracker/base.py | 2 --
 1 file changed, 2 deletions(-)

diff --git a/ipatests/test_xmlrpc/tracker/base.py b/ipatests/test_xmlrpc/tracker/base.py
index f7fc55d..7eed5b6 100644
--- a/ipatests/test_xmlrpc/tracker/base.py
+++ b/ipatests/test_xmlrpc/tracker/base.py
@@ -69,8 +69,6 @@ class Tracker(object):
 retrieve_all_keys = None
 create_keys = None
 update_keys = None
-managedby_keys = None
-allowedto_keys = None
 
 _override_me_msg = "This method needs to be overridden in a subclass"
 
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#93][opened] Tests: Remove SSSD restart from integration tests

2016-09-20 Thread mirielka
   URL: https://github.com/freeipa/freeipa/pull/93
Author: mirielka
 Title: #93: Tests: Remove SSSD restart from integration tests
Action: opened

PR body:
"""
SSSD restart has been mistakenly added to integration tests
(test_integration/tasks.py::uninstall_master). When system setup is correct,
this restart has no significance, moreover it makes tests fail, hence its
removal is necessary.

https://fedorahosted.org/freeipa/ticket/6338
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/93/head:pr93
git checkout pr93
From 2ba6a0564f405b56e2cc5085d6f5d07dc2cb78c9 Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Tue, 20 Sep 2016 08:15:14 +0200
Subject: [PATCH] Tests: Remove SSSD restart from integration tests

SSSD restart has been mistakenly added to integration tests
(test_integration/tasks.py::uninstall_master). When system setup is correct,
this restart has no significance, moreover it makes tests fail, hence its
removal is necessary.

https://fedorahosted.org/freeipa/ticket/6338
---
 ipatests/test_integration/tasks.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/ipatests/test_integration/tasks.py b/ipatests/test_integration/tasks.py
index ee9d4a2..99761ca 100644
--- a/ipatests/test_integration/tasks.py
+++ b/ipatests/test_integration/tasks.py
@@ -691,7 +691,6 @@ def uninstall_master(host, ignore_topology_disconnect=True,
  "xargs rm -fv", raiseonerr=False)
 host.run_command("find /run/ipa -name 'krb5*' | xargs rm -fv",
  raiseonerr=False)
-host.run_command(['systemctl', 'restart', 'sssd'])
 unapply_fixes(host)
 
 
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#77][synchronized] Tests: Update host test with ipa-join

2016-09-20 Thread mirielka
   URL: https://github.com/freeipa/freeipa/pull/77
Author: mirielka
 Title: #77: Tests: Update host test with ipa-join
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/77/head:pr77
git checkout pr77
From a31c9b19918eac94a03277b35ff6e9c3b9319edc Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Tue, 20 Sep 2016 09:12:48 +0200
Subject: [PATCH 1/2] Tests: Update host test with ipa-join

Updating path to ipa-join command to allow execution of
test_xmlrpc/test_host::TestHostFalsePwdChange::test_join_host.

https://fedorahosted.org/freeipa/ticket/6326
---
 ipatests/test_xmlrpc/test_host_plugin.py | 13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/ipatests/test_xmlrpc/test_host_plugin.py b/ipatests/test_xmlrpc/test_host_plugin.py
index 4ddabef..7e1dad0 100644
--- a/ipatests/test_xmlrpc/test_host_plugin.py
+++ b/ipatests/test_xmlrpc/test_host_plugin.py
@@ -42,6 +42,7 @@
 from ipatests.test_xmlrpc.tracker.host_plugin import HostTracker
 from ipatests.test_xmlrpc.testcert import get_testcert
 from ipatests.util import assert_deepequal
+from ipaplatform.paths import paths
 
 # Constants DNS integration tests
 # TODO: Use tracker fixtures for zones/records/users/groups
@@ -520,14 +521,18 @@ class TestHostFalsePwdChange(XMLRPC_test):
 def test_join_host(self, host, keytabname):
 """
 Create a test host and join it into IPA.
+
+This test must not run remotely.
 """
 
-join_command = 'ipa-client/ipa-join'
-if not os.path.isfile(join_command):
-pytest.skip("Command '%s' not found" % join_command)
+if not os.path.isfile(paths.SBIN_IPA_JOIN):
+pytest.skip("Command '%s' not found. "
+"The test must not run remotely."
+% paths.SBIN_IPA_JOIN)
 
 # create a test host with bulk enrollment password
 host.track_create()
+
 del host.attrs['krbprincipalname']
 host.attrs['has_password'] = True
 objclass = list(set(
@@ -545,7 +550,7 @@ def test_join_host(self, host, keytabname):
 
 # joint the host with the bulk password
 new_args = [
-join_command,
+paths.SBIN_IPA_JOIN,
 "-s", host.api.env.host,
 "-h", host.fqdn,
 "-k", keytabname,

From 6537079defe10f5222388b4b96cb1b965ccd3e8a Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Tue, 20 Sep 2016 09:15:36 +0200
Subject: [PATCH 2/2] Tests: Fix host attributes in ipa-join host test

Fixing discrepancies between returned and checked attributes in ipa-join host
test, that arose after recent changes in behavior.

https://fedorahosted.org/freeipa/ticket/6326
---
 ipatests/test_xmlrpc/test_host_plugin.py | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/ipatests/test_xmlrpc/test_host_plugin.py b/ipatests/test_xmlrpc/test_host_plugin.py
index 7e1dad0..279186b 100644
--- a/ipatests/test_xmlrpc/test_host_plugin.py
+++ b/ipatests/test_xmlrpc/test_host_plugin.py
@@ -533,7 +533,10 @@ def test_join_host(self, host, keytabname):
 # create a test host with bulk enrollment password
 host.track_create()
 
+# manipulate host.attrs to correspond with real attributes of host
+# after creating it with random password
 del host.attrs['krbprincipalname']
+del host.attrs['krbcanonicalname']
 host.attrs['has_password'] = True
 objclass = list(set(
 host.attrs['objectclass']) - {u'krbprincipal', u'krbprincipalaux'})
@@ -565,10 +568,13 @@ def test_join_host(self, host, keytabname):
 # the keytab is not necessary for further tests
 print(e)
 
+# fix host.attrs again to correspond with current state
 host.attrs['has_keytab'] = True
 host.attrs['has_password'] = False
 host.attrs['krbprincipalname'] = [u'host/%s@%s' % (host.fqdn,
host.api.env.realm)]
+host.attrs['krbcanonicalname'] = [u'host/%s@%s' % (host.fqdn,
+   host.api.env.realm)]
 host.retrieve()
 
 # Try to change the password of enrolled host with specified password
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#86][comment] Made sssd restart a non-raising opration

2016-09-19 Thread mirielka
  URL: https://github.com/freeipa/freeipa/pull/86
Title: #86: Made sssd restart a non-raising opration

mirielka commented:
"""
Hi,
so sorry about this, but the necessity of sssd restart was caused by some 
leftover mess on the machines where I ran the trust related tests. If the 
configuration is correct and system clean, the restart is not necessary. I 
recommend rejecting this patch and will provide fix for my error ASAP.
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/86#issuecomment-248088611
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#77] Tests: Update host test with ipa-join (opened)

2016-09-13 Thread mirielka
mirielka's pull request #77: "Tests: Update host test with ipa-join" was opened

PR body:
"""
Updating path to ipa-join command to allow execution of
test_xmlrpc/test_host::TestHostFalsePwdChange::test_join_host. Fixing
discrepancies in returned and checked attributes.

https://fedorahosted.org/freeipa/ticket/6326
"""

See the full pull-request at https://github.com/freeipa/freeipa/pull/77
... or pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/77/head:pr77
git checkout pr77
From 915d38546ff73ff14e352b4d83b5e1e09a10e469 Mon Sep 17 00:00:00 2001
From: Lenka Doudova 
Date: Tue, 13 Sep 2016 14:50:55 +0200
Subject: [PATCH] Tests: Update host test with ipa-join

Updating path to ipa-join command to allow execution of
test_xmlrpc/test_host::TestHostFalsePwdChange::test_join_host. Fixing
discrepancies in returned and checked attributes.

https://fedorahosted.org/freeipa/ticket/6326
---
 ipatests/test_xmlrpc/test_host_plugin.py | 19 +++
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/ipatests/test_xmlrpc/test_host_plugin.py b/ipatests/test_xmlrpc/test_host_plugin.py
index 4ddabef..279186b 100644
--- a/ipatests/test_xmlrpc/test_host_plugin.py
+++ b/ipatests/test_xmlrpc/test_host_plugin.py
@@ -42,6 +42,7 @@
 from ipatests.test_xmlrpc.tracker.host_plugin import HostTracker
 from ipatests.test_xmlrpc.testcert import get_testcert
 from ipatests.util import assert_deepequal
+from ipaplatform.paths import paths
 
 # Constants DNS integration tests
 # TODO: Use tracker fixtures for zones/records/users/groups
@@ -520,15 +521,22 @@ class TestHostFalsePwdChange(XMLRPC_test):
 def test_join_host(self, host, keytabname):
 """
 Create a test host and join it into IPA.
+
+This test must not run remotely.
 """
 
-join_command = 'ipa-client/ipa-join'
-if not os.path.isfile(join_command):
-pytest.skip("Command '%s' not found" % join_command)
+if not os.path.isfile(paths.SBIN_IPA_JOIN):
+pytest.skip("Command '%s' not found. "
+"The test must not run remotely."
+% paths.SBIN_IPA_JOIN)
 
 # create a test host with bulk enrollment password
 host.track_create()
+
+# manipulate host.attrs to correspond with real attributes of host
+# after creating it with random password
 del host.attrs['krbprincipalname']
+del host.attrs['krbcanonicalname']
 host.attrs['has_password'] = True
 objclass = list(set(
 host.attrs['objectclass']) - {u'krbprincipal', u'krbprincipalaux'})
@@ -545,7 +553,7 @@ def test_join_host(self, host, keytabname):
 
 # joint the host with the bulk password
 new_args = [
-join_command,
+paths.SBIN_IPA_JOIN,
 "-s", host.api.env.host,
 "-h", host.fqdn,
 "-k", keytabname,
@@ -560,10 +568,13 @@ def test_join_host(self, host, keytabname):
 # the keytab is not necessary for further tests
 print(e)
 
+# fix host.attrs again to correspond with current state
 host.attrs['has_keytab'] = True
 host.attrs['has_password'] = False
 host.attrs['krbprincipalname'] = [u'host/%s@%s' % (host.fqdn,
host.api.env.realm)]
+host.attrs['krbcanonicalname'] = [u'host/%s@%s' % (host.fqdn,
+   host.api.env.realm)]
 host.retrieve()
 
 # Try to change the password of enrolled host with specified password
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#75] Tests: Remove usage of krb5 ccache from test_ipaserver/test_ldap (opened)

2016-09-13 Thread mirielka
mirielka's pull request #75: "Tests: Remove usage of krb5 ccache from 
test_ipaserver/test_ldap" was opened

PR body:
"""
In test_ipaserver/test_ldap::test_ldap::test_GSSAPI a krb5 ccache is used to
connect to ldap. The test tries to locate this cache in /tmp/krb5cc_$UID file,
which is not there due to default settings in krb5.conf, and hence the whole
test is skipped. Fix the test to use keyring to connect instead of ccache in
/tmp.

https://fedorahosted.org/freeipa/ticket/6323
"""

See the full pull-request at https://github.com/freeipa/freeipa/pull/75
... or pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/75/head:pr75
git checkout pr75
From f28953cd16bf034ab076daac439d9ab521966c6a Mon Sep 17 00:00:00 2001
From: Lenka Doudova 
Date: Tue, 13 Sep 2016 10:11:30 +0200
Subject: [PATCH] Tests: Remove usage of krb5 ccache from
 test_ipaserver/test_ldap

In test_ipaserver/test_ldap::test_ldap::test_GSSAPI a krb5 ccache is used to
connect to ldap. The test tries to locate this cache in /tmp/krb5cc_$UID file,
which is not there due to default settings in krb5.conf, and hence the whole
test is skipped. Fix the test to use keyring to connect instead of ccache in
/tmp.

https://fedorahosted.org/freeipa/ticket/6323
---
 ipatests/test_ipaserver/test_ldap.py | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/ipatests/test_ipaserver/test_ldap.py b/ipatests/test_ipaserver/test_ldap.py
index a92c503..4963e71 100644
--- a/ipatests/test_ipaserver/test_ldap.py
+++ b/ipatests/test_ipaserver/test_ldap.py
@@ -37,7 +37,6 @@
 from ipaserver.plugins.ldap2 import ldap2
 from ipalib import api, x509, create_api, errors
 from ipapython import ipautil
-from ipaplatform.paths import paths
 from ipapython.dn import DN
 
 if six.PY3:
@@ -53,7 +52,6 @@ class test_ldap(object):
 def setup(self):
 self.conn = None
 self.ldapuri = 'ldap://%s' % ipautil.format_netloc(api.env.host)
-self.ccache = paths.TMP_KRB5CC % os.getuid()
 nss.nss_init_nodb()
 self.dn = DN(('krbprincipalname','ldap/%s@%s' % (api.env.host, api.env.realm)),
  ('cn','services'),('cn','accounts'),api.env.basedn)
@@ -77,10 +75,8 @@ def test_GSSAPI(self):
 """
 Test a GSSAPI LDAP bind using ldap2
 """
-if not ipautil.file_exists(self.ccache):
-raise nose.SkipTest('Missing ccache %s' % self.ccache)
 self.conn = ldap2(api, ldap_uri=self.ldapuri)
-self.conn.connect(ccache='FILE:%s' % self.ccache)
+self.conn.connect()
 entry_attrs = self.conn.get_entry(self.dn, ['usercertificate'])
 cert = entry_attrs.get('usercertificate')
 cert = cert[0]
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#74] [master, ipa-4-4] Tests: Add krb5kdc.service restart to integration trust tests (opened)

2016-09-13 Thread mirielka
mirielka's pull request #74: "[master, ipa-4-4] Tests: Add krb5kdc.service 
restart to integration trust tests" was opened

PR body:
"""
krb5kdc.service restart is necessary for proper running of integration trust
related tests.

https://fedorahosted.org/freeipa/ticket/6322
"""

See the full pull-request at https://github.com/freeipa/freeipa/pull/74
... or pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/74/head:pr74
git checkout pr74
From a220977bcd55137a6f96bc60987e24978390332f Mon Sep 17 00:00:00 2001
From: Lenka Doudova 
Date: Tue, 13 Sep 2016 08:17:53 +0200
Subject: [PATCH] Tests: Add krb5kdc.service restart to integration trust tests

krb5kdc.service restart is necessary for proper running of integration trust
related tests.

https://fedorahosted.org/freeipa/ticket/6322
---
 ipatests/test_integration/tasks.py  | 2 ++
 ipatests/test_integration/test_trust.py | 3 ---
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/ipatests/test_integration/tasks.py b/ipatests/test_integration/tasks.py
index c60d436..b8defa7 100644
--- a/ipatests/test_integration/tasks.py
+++ b/ipatests/test_integration/tasks.py
@@ -490,6 +490,8 @@ def establish_trust_with_ad(master, ad_domain, extra_args=()):
 stdin_text=master.config.ad_admin_password)
 master.run_command(['smbcontrol', 'all', 'debug', '1'])
 clear_sssd_cache(master)
+master.run_command(['systemctl', 'restart', 'krb5kdc.service'])
+time.sleep(60)
 
 
 def remove_trust_with_ad(master, ad_domain):
diff --git a/ipatests/test_integration/test_trust.py b/ipatests/test_integration/test_trust.py
index 69418dc..6b30338 100644
--- a/ipatests/test_integration/test_trust.py
+++ b/ipatests/test_integration/test_trust.py
@@ -24,7 +24,6 @@
 from ipatests.test_integration import tasks
 from ipatests.test_integration import util
 from ipaplatform.paths import paths
-import time
 
 
 class ADTrustBase(IntegrationTest):
@@ -400,8 +399,6 @@ def test_upn_user_resolution_in_nonposix_trust(self):
 
 def test_upn_user_authentication(self):
 """ Check that AD user with UPN can authenticate in IPA """
-self.master.run_command(['systemctl', 'restart', 'krb5kdc'])
-time.sleep(60)
 self.master.run_command(['kinit', '-C', '-E', self.upn_principal],
 stdin_text=self.upn_password)
 
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#70] [master, ipa-4-4] Tests: Fix failing ldap.backend test (edited)

2016-09-09 Thread mirielka
mirielka's pull request #70: "[master, ipa-4-4] Tests: Fix failing ldap.backend 
test" was edited

See the full pull-request at https://github.com/freeipa/freeipa/pull/70
... or pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/70/head:pr70
git checkout pr70
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#70] [Tests: Fix failing ldap.backend test (opened)

2016-09-09 Thread mirielka
mirielka's pull request #70: "[Tests: Fix failing ldap.backend test" was opened

PR body:
"""
Test ipatests/test_ipaserver/test_ldap::test_Backend fails claiming service
cannot be found. Fixing this by not using api with in_tree parameter.

https://fedorahosted.org/freeipa/ticket/6312
"""

See the full pull-request at https://github.com/freeipa/freeipa/pull/70
... or pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/70/head:pr70
git checkout pr70
From bbd7a3f7f52c7122a45ba1f2450ab34e85268f24 Mon Sep 17 00:00:00 2001
From: Lenka Doudova 
Date: Fri, 9 Sep 2016 11:24:01 +0200
Subject: [PATCH] Tests: Fix failing ldap.backend test

Test ipatests/test_ipaserver/test_ldap::test_Backend fails claiming service
cannot be found. Fixing this by not using api with in_tree parameter.

https://fedorahosted.org/freeipa/ticket/6312
---
 ipatests/test_ipaserver/test_ldap.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipatests/test_ipaserver/test_ldap.py b/ipatests/test_ipaserver/test_ldap.py
index a92c503..9616913 100644
--- a/ipatests/test_ipaserver/test_ldap.py
+++ b/ipatests/test_ipaserver/test_ldap.py
@@ -115,7 +115,7 @@ def test_Backend(self):
 # a client-only api. Then we register in the commands and objects
 # we need for the test.
 myapi = create_api(mode=None)
-myapi.bootstrap(context='cli', in_server=True, in_tree=True)
+myapi.bootstrap(context='cli', in_server=True)
 myapi.finalize()
 
 pwfile = api.env.dot_ipa + os.sep + ".dmpw"
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#60] Tests: extend DNS cmdline tests with lowercased record type (+ack)

2016-09-08 Thread mirielka
mbasti-rh's pull request #60: "Tests: extend DNS cmdline tests with lowercased 
record type" label *ack* has been added

See the full pull-request at https://github.com/freeipa/freeipa/pull/60
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#43] Tests: Fix regex errors in integration trust tests (synchronize)

2016-09-07 Thread mirielka
mirielka's pull request #43: "Tests: Fix regex errors in integration trust 
tests" was synchronize

See the full pull-request at https://github.com/freeipa/freeipa/pull/43
... or pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/43/head:pr43
git checkout pr43
From 313aa2b2ec7af4e3ee232de75ed99bc0795f834a Mon Sep 17 00:00:00 2001
From: Lenka Doudova 
Date: Wed, 31 Aug 2016 16:57:12 +0200
Subject: [PATCH] Tests: Fix regex errors in integration trust tests

In integration trust tests some values are checked using regular expressions.
Some of these expressions from recently added coverage have minor mistakes
which causes the comparisons to fail. Providing fix for these regular
expressions.

https://fedorahosted.org/freeipa/ticket/6285
---
 ipatests/test_integration/test_trust.py | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/ipatests/test_integration/test_trust.py b/ipatests/test_integration/test_trust.py
index d0b8e58..69418dc 100644
--- a/ipatests/test_integration/test_trust.py
+++ b/ipatests/test_integration/test_trust.py
@@ -298,8 +298,8 @@ def test_user_gid_uid_resolution_in_nonposix_trust(self):
 testuser = 'subdomaintestuser@{0}'.format(self.ad_subdomain)
 result = self.master.run_command(['getent', 'passwd', testuser])
 
-testuser_regex = ("^subdomaintestuser@{0}:\*:(?!10042)(\d+):"
-  "(?!)10047(\d+):Subdomain TestUser:"
+testuser_regex = ("^subdomaintestuser@{0}:\*:(?!10142)(\d+):"
+  "(?!10147)(\d+):Subdomaintest User:"
   "/home/{1}/subdomaintestuser:/bin/sh$".format(
   re.escape(self.ad_subdomain),
   re.escape(self.ad_subdomain)))
@@ -393,8 +393,9 @@ def test_upn_user_resolution_in_nonposix_trust(self):
   self.upn_principal])
 
 # result will contain AD domain, not UPN
-upnuser_regex = "^{}@{}:\*:(\d+):(\d+):{}:/:$".format(
-self.upn_username, self.ad_domain, self.upn_name)
+upnuser_regex = "^{}@{}:\*:(\d+):(\d+):{}:/home/{}/{}:/bin/sh$".format(
+self.upn_username, self.ad_domain, self.upn_name,
+self.ad_domain, self.upn_username)
 assert re.search(upnuser_regex, result.stdout_text)
 
 def test_upn_user_authentication(self):
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#43] Tests: Fix regex errors in integration trust tests (synchronize)

2016-09-05 Thread mirielka
mirielka's pull request #43: "Tests: Fix regex errors in integration trust 
tests" was synchronize

See the full pull-request at https://github.com/freeipa/freeipa/pull/43
... or pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/43/head:pr43
git checkout pr43
From 02e458ad286eea2bade6b20fa8c1944d0fa752b4 Mon Sep 17 00:00:00 2001
From: Lenka Doudova 
Date: Wed, 31 Aug 2016 16:57:12 +0200
Subject: [PATCH] Tests: Fix regex errors in integration trust tests

In integration trust tests some values are checked using regular expressions.
Some of these expressions from recently added coverage have minor mistakes
which causes the comparisons to fail. Providing fix for these regular
expressions.

https://fedorahosted.org/freeipa/ticket/6285
---
 ipatests/test_integration/test_trust.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ipatests/test_integration/test_trust.py b/ipatests/test_integration/test_trust.py
index d0b8e58..c0695ed 100644
--- a/ipatests/test_integration/test_trust.py
+++ b/ipatests/test_integration/test_trust.py
@@ -298,8 +298,8 @@ def test_user_gid_uid_resolution_in_nonposix_trust(self):
 testuser = 'subdomaintestuser@{0}'.format(self.ad_subdomain)
 result = self.master.run_command(['getent', 'passwd', testuser])
 
-testuser_regex = ("^subdomaintestuser@{0}:\*:(?!10042)(\d+):"
-  "(?!)10047(\d+):Subdomain TestUser:"
+testuser_regex = ("^subdomaintestuser@{0}:\*:(?!10142)(\d+):"
+  "(?!10147)(\d+):Subdomaintest User:"
   "/home/{1}/subdomaintestuser:/bin/sh$".format(
   re.escape(self.ad_subdomain),
   re.escape(self.ad_subdomain)))
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#43] Tests: Fix regex errors in integration trust tests (synchronize)

2016-09-02 Thread mirielka
mirielka's pull request #43: "Tests: Fix regex errors in integration trust 
tests" was synchronize

See the full pull-request at https://github.com/freeipa/freeipa/pull/43
... or pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/43/head:pr43
git checkout pr43
From 974f6693532f6e6851fbbd46fcb2923ab7402041 Mon Sep 17 00:00:00 2001
From: Lenka Doudova 
Date: Wed, 31 Aug 2016 16:57:12 +0200
Subject: [PATCH] Tests: Fix regex errors in integration trust tests

In integration trust tests some values are checked using regular expressions.
Some of these expressions from recently added coverage have minor mistakes
which causes the comparisons to fail. Providing fix for these regular
expressions.

https://fedorahosted.org/freeipa/ticket/6285
---
 ipatests/test_integration/test_trust.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipatests/test_integration/test_trust.py b/ipatests/test_integration/test_trust.py
index d0b8e58..eefa7e5 100644
--- a/ipatests/test_integration/test_trust.py
+++ b/ipatests/test_integration/test_trust.py
@@ -299,7 +299,7 @@ def test_user_gid_uid_resolution_in_nonposix_trust(self):
 result = self.master.run_command(['getent', 'passwd', testuser])
 
 testuser_regex = ("^subdomaintestuser@{0}:\*:(?!10042)(\d+):"
-  "(?!)10047(\d+):Subdomain TestUser:"
+  "(?!10047)(\d+):Subdomain TestUser:"
   "/home/{1}/subdomaintestuser:/bin/sh$".format(
   re.escape(self.ad_subdomain),
   re.escape(self.ad_subdomain)))
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#51] Fix failing negative tests for deprecated params (+ack)

2016-09-02 Thread mirielka
martbab's pull request #51: "Fix failing negative tests for deprecated params" 
label *ack* has been added

See the full pull-request at https://github.com/freeipa/freeipa/pull/51
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#44] rpcserver: fix crash in XML-RPC system commands (+ack)

2016-09-01 Thread mirielka
jcholast's pull request #44: "rpcserver: fix crash in XML-RPC system commands" 
label *ack* has been added

See the full pull-request at https://github.com/freeipa/freeipa/pull/44
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#42] Tests: Avoid skipping tests due to missing files (synchronize)

2016-09-01 Thread mirielka
mirielka's pull request #42: "Tests: Avoid skipping tests due to missing files" 
was synchronize

See the full pull-request at https://github.com/freeipa/freeipa/pull/42
... or pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/42/head:pr42
git checkout pr42
From afadf30be59933daab429231f51e87bf57559038 Mon Sep 17 00:00:00 2001
From: Lenka Doudova 
Date: Thu, 1 Sep 2016 09:46:17 +0200
Subject: [PATCH] Tests: Avoid skipping tests due to missing files

When running test_install/test_updates and test_pkcs10/test_pkcs10 as
outoftree, these are skipped with reason 'Unable to find test update files'.
For outoftree tests wrong paths are checked for these files.
Changing file localization to provide proper test setup.

https://fedorahosted.org/freeipa/ticket/6284
---
 ipatests/test_install/test_updates.py | 41 +--
 ipatests/test_pkcs10/test_pkcs10.py   | 11 +-
 2 files changed, 30 insertions(+), 22 deletions(-)

diff --git a/ipatests/test_install/test_updates.py b/ipatests/test_install/test_updates.py
index b41a7c5..3fa2cd7 100644
--- a/ipatests/test_install/test_updates.py
+++ b/ipatests/test_install/test_updates.py
@@ -65,11 +65,9 @@ def setUp(self):
 self.updater = LDAPUpdate(dm_password=self.dm_password, sub_dict={})
 self.ld = ipaldap.IPAdmin(fqdn)
 self.ld.do_simple_bind(bindpw=self.dm_password)
-if ipautil.file_exists("0_reset.update"):
-self.testdir="./"
-elif ipautil.file_exists("ipatests/test_install/0_reset.update"):
-self.testdir= "./ipatests/test_install/"
-else:
+self.testdir = os.path.abspath(os.path.dirname(__file__))
+if not ipautil.file_exists(os.path.join(self.testdir,
+"0_reset.update")):
 raise nose.SkipTest("Unable to find test update files")
 
 self.container_dn = DN(self.updater._template_str('cn=test, cn=accounts, $SUFFIX'))
@@ -84,7 +82,8 @@ def test_0_reset(self):
 Reset the updater test data to a known initial state (test_0_reset)
 """
 try:
-modified = self.updater.update([self.testdir + "0_reset.update"])
+modified = self.updater.update([os.path.join(self.testdir,
+ "0_reset.update")])
 except errors.NotFound:
 # Just means the entry doesn't exist yet
 modified = True
@@ -103,7 +102,8 @@ def test_1_add(self):
 """
 Test the updater with an add directive (test_1_add)
 """
-modified = self.updater.update([self.testdir + "1_add.update"])
+modified = self.updater.update([os.path.join(self.testdir,
+ "1_add.update")])
 
 self.assertTrue(modified)
 
@@ -137,7 +137,8 @@ def test_2_update(self):
 """
 Test the updater when adding an attribute to an existing entry (test_2_update)
 """
-modified = self.updater.update([self.testdir + "2_update.update"])
+modified = self.updater.update([os.path.join(self.testdir,
+ "2_update.update")])
 self.assertTrue(modified)
 
 entries = self.ld.get_entries(
@@ -150,7 +151,8 @@ def test_3_update(self):
 """
 Test the updater forcing an attribute to a given value (test_3_update)
 """
-modified = self.updater.update([self.testdir + "3_update.update"])
+modified = self.updater.update([os.path.join(self.testdir,
+ "3_update.update")])
 self.assertTrue(modified)
 
 entries = self.ld.get_entries(
@@ -163,7 +165,8 @@ def test_4_update(self):
 """
 Test the updater adding a new value to a single-valued attribute (test_4_update)
 """
-modified = self.updater.update([self.testdir + "4_update.update"])
+modified = self.updater.update([os.path.join(self.testdir,
+ "4_update.update")])
 self.assertTrue(modified)
 
 entries = self.ld.get_entries(
@@ -176,7 +179,8 @@ def test_5_update(self):
 """
 Test the updater adding a new value to a multi-valued attribute (test_5_update)
 """
-modified = self.updater.update([self.testdir + "5_update.update"])
+modified = self.updater.update([os.path.join(self.testdir,
+ "5_update.update")])
 self.assertTrue(modified)
 
 entries = self.ld.get_entries(
@@ -189,7 +193,8 @@ def test_6_update(self):
 """
 Test the updater removing a value from a multi-valued attribute (test_6_update)
 """
-modified = self.updater.update([self.testdir + "6_update.update"])
+modified = 

[Freeipa-devel] [freeipa PR#42] Tests: Avoid skipping tests due to missing files (opened)

2016-08-31 Thread mirielka
mirielka's pull request #42: "Tests: Avoid skipping tests due to missing files" 
was opened

PR body:
"""
When running test_install/test_updates and test_pkcs10/test_pkcs10 as
outoftree, these are skipped with reason 'Unable to find test update files'.
For outoftree tests wrong paths are checked for these files.
Adding proper paths to test setup.

https://fedorahosted.org/freeipa/ticket/6284
"""

See the full pull-request at https://github.com/freeipa/freeipa/pull/42
... or pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/42/head:pr42
git checkout pr42
From 965e54f016f52bdfcddb05a08d49ba4a01af25b8 Mon Sep 17 00:00:00 2001
From: Lenka Doudova 
Date: Wed, 31 Aug 2016 15:51:51 +0200
Subject: [PATCH] Tests: Avoid skipping tests due to missing files

When running test_install/test_updates and test_pkcs10/test_pkcs10 as
outoftree, these are skipped with reason 'Unable to find test update files'.
For outoftree tests wrong paths are checked for these files.
Adding proper paths to test setup.

https://fedorahosted.org/freeipa/ticket/6284
---
 ipatests/test_install/test_updates.py | 2 ++
 ipatests/test_pkcs10/test_pkcs10.py   | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/ipatests/test_install/test_updates.py b/ipatests/test_install/test_updates.py
index b41a7c5..51301cc 100644
--- a/ipatests/test_install/test_updates.py
+++ b/ipatests/test_install/test_updates.py
@@ -69,6 +69,8 @@ def setUp(self):
 self.testdir="./"
 elif ipautil.file_exists("ipatests/test_install/0_reset.update"):
 self.testdir= "./ipatests/test_install/"
+elif ipautil.file_exists("test_install/0_reset.update"):
+self.testdir= "./test_install/"
 else:
 raise nose.SkipTest("Unable to find test update files")
 
diff --git a/ipatests/test_pkcs10/test_pkcs10.py b/ipatests/test_pkcs10/test_pkcs10.py
index 86de3c6..6a61709 100644
--- a/ipatests/test_pkcs10/test_pkcs10.py
+++ b/ipatests/test_pkcs10/test_pkcs10.py
@@ -45,6 +45,8 @@ def setup(self):
 self.testdir="./"
 elif ipautil.file_exists("ipatests/test_pkcs10/test0.csr"):
 self.testdir= "./ipatests/test_pkcs10/"
+elif ipautil.file_exists("test_pkcs10/test0.csr"):
+self.testdir= "./test_pkcs10/"
 else:
 raise nose.SkipTest("Unable to find test update files")
 
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#39] Tests: Add missing attributes to test_xmlrpc/test_trust tests (opened)

2016-08-30 Thread mirielka
mirielka's pull request #39: "Tests: Add missing attributes to 
test_xmlrpc/test_trust tests" was opened

PR body:
"""
Several tests in test_xmlrpc/test_trust_plugin.py fail because some attributes
are not expected. Fixing the tests so that the extra attributes are recognized.

https://fedorahosted.org/freeipa/ticket/6276
"""

See the full pull-request at https://github.com/freeipa/freeipa/pull/39
... or pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/39/head:pr39
git checkout pr39


freeipa-pr-39.patch
Description: application/text/diff
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#27] [master, ipa-4-3] Tests: Fix integration sudo tests setup and checks (synchronize)

2016-08-29 Thread mirielka
mirielka's pull request #27: "[master, ipa-4-3] Tests: Fix integration sudo 
tests setup and checks" was synchronize

See the full pull-request at https://github.com/freeipa/freeipa/pull/27
... or pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/27/head:pr27
git checkout pr27


freeipa-pr-27.patch
Description: application/text/diff
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#27] [master, ipa-4-3] Tests: Fix integration sudo tests setup and checks (comment)

2016-08-29 Thread mirielka
mirielka commented on a pull request

"""
Yes, I also though about not running e.g. `su -c "sudo -l" testuser` but `su -c 
"sudo -l -n" testuser` - it would report error `sudo: a password is required` 
instead of the previously pasted message that doesn't say that much...
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/27#issuecomment-243084523
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#27] Tests: Fix integration sudo tests setup and checks (edited)

2016-08-26 Thread mirielka
mirielka's pull request #27: "Tests: Fix integration sudo tests setup and 
checks" was edited

See the full pull-request at https://github.com/freeipa/freeipa/pull/27
... or pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/27/head:pr27
git checkout pr27
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#27] Tests: Fix integration sudo tests setup and checks (opened)

2016-08-26 Thread mirielka
mirielka's pull request #27: "Tests: Fix integration sudo tests setup and 
checks" was opened

PR body:
"""
Adding 'defaults' sudorule to prevent requesting further user authentication.
Adding checks that if a user should be rejected access, a proper error message
is displayed.

https://fedorahosted.org/freeipa/ticket/6262
"""

See the full pull-request at https://github.com/freeipa/freeipa/pull/27
... or pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/27/head:pr27
git checkout pr27


freeipa-pr-27.patch
Description: application/text/diff
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#24] [master, ipa-4-3] Raise error when running ipa-adtrust-install with empty netbios--name (opened)

2016-08-26 Thread mirielka
mirielka's pull request #24: "[master, ipa-4-3] Raise error when running 
ipa-adtrust-install with empty netbios--name" was opened

PR body:
"""
When running ipa-adtrust-install, a netbios-name option must be specified.
Currently if an invalid netbios name in form of empty string is specified, the
installation proceeds, but changes the invalid value to a netbios name
determined from domain name without any notification.

Fixing this so that any attempt to supply empty string as netbios name fails
with error in case of unattended installation, or to request input of valid
netbios name from command line during normal installation.

https://fedorahosted.org/freeipa/ticket/6120

**Note - newly intended behavirour of ipa-adtrust-install:**
- unattended installation with --netbios-name="" fails
- unattended installation without --netbios-name specification proceeds and 
uses default value derived from domain name
- normal installation in both cases requests inserting of valid netbios name
"""

See the full pull-request at https://github.com/freeipa/freeipa/pull/24
... or pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/24/head:pr24
git checkout pr24


freeipa-pr-24.patch
Description: application/text/diff
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#24] [master, ipa-4-3] Raise error when running ipa-adtrust-install with empty netbios--name (edited)

2016-08-26 Thread mirielka
mirielka's pull request #24: "[master, ipa-4-3] Raise error when running 
ipa-adtrust-install with empty netbios--name" was edited

See the full pull-request at https://github.com/freeipa/freeipa/pull/24
... or pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/24/head:pr24
git checkout pr24
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#17] Tests: Random issuer certificate can be added to a service (opened)

2016-08-24 Thread mirielka
mirielka's pull request #17: "Tests: Random issuer certificate can be added to 
a service" was opened

PR body:
"""
Changing negative test case that verified that a certificate with different
than expected issuer cannot be added to a service to a positive one that
verifies that this operation now proceeds successfully. Corresponds to changes
made in scope of https://fedorahosted.org/freeipa/ticket/4559 implementation.

https://fedorahosted.org/freeipa/ticket/6258
"""

See the full pull-request at https://github.com/freeipa/freeipa/pull/17
... or pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/17/head:pr17
git checkout pr17


freeipa-pr-17.patch
Description: application/text/diff
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [freeipa PR#14] Tests: Failing intree tests (opened)

2016-08-23 Thread mirielka
mirielka's pull request #14: "Tests: Failing intree tests" was opened

PR body:
Fixing failing tests in:
test_ipalib/test_plugable
test_ipalib/test_rpc
test_ipaserver/test_ldap
All issues were discussed with Jan Cholasta and are results of thin client 
implementation.

See the full pull-request at https://github.com/freeipa/freeipa/pull/14
... or pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/14/head:pr14
git checkout pr14


freeipa-pr-14.patch
Description: application/text/diff
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code