diff options
| author | Oleg Fayans <ofayans@redhat.com> | 2016-08-24 13:53:17 +0200 |
|---|---|---|
| committer | Martin Basti <mbasti@redhat.com> | 2016-09-15 10:21:56 +0200 |
| commit | 3e4740f788aee00ae03a61d39238f605779fcece (patch) | |
| tree | 1d6b371d7ccd3fbe67d7e7bd057d6cbfcd446bb4 | |
| parent | 49fbbb0641df2adab28fd3440686cb7430645c85 (diff) | |
Xfailed a test that fails due to 6250
Also created a decorator that removes the segment that the next test does not
expect.
https://fedorahosted.org/freeipa/ticket/6250
Reviewed-By: Martin Basti <mbasti@redhat.com>
| -rw-r--r-- | ipatests/test_integration/test_topology.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ipatests/test_integration/test_topology.py b/ipatests/test_integration/test_topology.py index a3e0488ea..4cdcd46a1 100644 --- a/ipatests/test_integration/test_topology.py +++ b/ipatests/test_integration/test_topology.py @@ -27,6 +27,26 @@ def find_segment(master, replica): return '-to-'.join(segment) +def remove_segment(master, host1, host2): + """ + This removes a segment between host1 and host2 on master. The function is + needed because test_add_remove_segment expects only one segment, but due to + track tickete N 6250, the test_topology_updated_on_replica_install_remove + leaves 2 topology segments + """ + def wrapper(func): + def wrapped(*args, **kwargs): + try: + func(*args, **kwargs) + finally: + segment = find_segment(host1, host2) + master.run_command(['ipa', 'topologysegment-del', + DOMAIN_SUFFIX_NAME, segment], + raiseonerr=False) + return wrapped + return wrapper + + @pytest.mark.skipif(config.domain_level == 0, reason=reasoning) class TestTopologyOptions(IntegrationTest): num_replicas = 2 @@ -64,6 +84,10 @@ class TestTopologyOptions(IntegrationTest): ) return result + @pytest.mark.xfail(reason="Trac 6250", strict=True) + @remove_segment(config.domains[0].master, + config.domains[0].master, + config.domains[0].replicas[1]) def test_topology_updated_on_replica_install_remove(self): """ Install and remove a replica and make sure topology information is |
