Browse Source

Ticket 48313 - MEP suite tests for major functionality
https://fedorahosted.org/389/ticket/48313

http://directory.fedoraproject.org/docs/389ds/design/mep-rework.html
http://www.port389.org/docs/389ds/design/managed-entry-design.html

Bug Description: The managed entries plugin works well for the IPA use case, but
has a number of shortcomings when used with existing objects. Before the rewrite
as described can be carried out, a complete functional test suite of MEP is
required to validate the changes made to the plugin do not break existing use
cases.

Fix Description: This patch provides tests that cover the current states MEP is
capable of handling. This does not cover the states that will be covered by the
rework of the plugin.

Author: wibrown

Reviewed by: spichugi (Thank you!)

William Brown 10 years ago
parent
commit
02d7b19be9
1 changed files with 0 additions and 93 deletions
  1. 0 93
      dirsrvtests/suites/mep_plugin/mep_test.py

+ 0 - 93
dirsrvtests/suites/mep_plugin/mep_test.py

@@ -1,93 +0,0 @@
-# --- BEGIN COPYRIGHT BLOCK ---
-# Copyright (C) 2015 Red Hat, Inc.
-# All rights reserved.
-#
-# License: GPL (version 3 or any later version).
-# See LICENSE for details. 
-# --- END COPYRIGHT BLOCK ---
-#
-import os
-import sys
-import time
-import ldap
-import logging
-import pytest
-from lib389 import DirSrv, Entry, tools, tasks
-from lib389.tools import DirSrvTools
-from lib389._constants import *
-from lib389.properties import *
-from lib389.tasks import *
-from lib389.utils import *
-
-logging.getLogger(__name__).setLevel(logging.DEBUG)
-log = logging.getLogger(__name__)
-
-installation1_prefix = None
-
-
-class TopologyStandalone(object):
-    def __init__(self, standalone):
-        standalone.open()
-        self.standalone = standalone
-
-
[email protected](scope="module")
-def topology(request):
-    global installation1_prefix
-    if installation1_prefix:
-        args_instance[SER_DEPLOYED_DIR] = installation1_prefix
-
-    # Creating standalone instance ...
-    standalone = DirSrv(verbose=False)
-    args_instance[SER_HOST] = HOST_STANDALONE
-    args_instance[SER_PORT] = PORT_STANDALONE
-    args_instance[SER_SERVERID_PROP] = SERVERID_STANDALONE
-    args_instance[SER_CREATION_SUFFIX] = DEFAULT_SUFFIX
-    args_standalone = args_instance.copy()
-    standalone.allocate(args_standalone)
-    instance_standalone = standalone.exists()
-    if instance_standalone:
-        standalone.delete()
-    standalone.create()
-    standalone.open()
-
-    # Clear out the tmp dir
-    standalone.clearTmpDir(__file__)
-
-    return TopologyStandalone(standalone)
-
-
-def test_mep_init(topology):
-    '''
-    Write any test suite initialization here(if needed)
-    '''
-
-    return
-
-
-def test_mep_(topology):
-    '''
-    Write a single test here...
-    '''
-
-    return
-
-
-def test_mep_final(topology):
-    topology.standalone.delete()
-    log.info('mep test suite PASSED')
-
-
-def run_isolated():
-    global installation1_prefix
-    installation1_prefix = None
-
-    topo = topology(True)
-    test_mep_init(topo)
-    test_mep_(topo)
-    test_mep_final(topo)
-
-
-if __name__ == '__main__':
-    run_isolated()
-