From 5cdfa0efb3883e96b157cd9e22839189a810642d Mon Sep 17 00:00:00 2001 From: William Brown Date: Thu, 11 Jan 2018 10:45:10 +1000 Subject: [PATCH] Ticket 49474 - purge saslmaps before gssapi test Bug Description: In the GSSAPI test, depending on enviroment some of the default maps can "work" or they "may not". This is due to inconsistency in the behaviour of the cyrus-sasl library and it's assignment of realm into requests. Fix Description: Purge all maps by default, and just use the provided test sasl map - this is a single "source of truth" and thus allows us to test assertions easier. https://pagure.io/389-ds-base/issue/49474 Author: wibrown Review by: ??? --- src/lib389/lib389/topologies.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib389/lib389/topologies.py b/src/lib389/lib389/topologies.py index ae64828..7e7bc0c 100644 --- a/src/lib389/lib389/topologies.py +++ b/src/lib389/lib389/topologies.py @@ -240,6 +240,9 @@ def topology_st_gssapi(request): # Add sasl mappings saslmappings = SaslMappings(topology.standalone) + # First, purge all the default maps. + [m.delete() for m in saslmappings.list()] + # Now create a single map that works for our case. saslmappings.create(properties={ 'cn': 'suffix map', # Don't add the realm due to a SASL bug -- 1.8.3.1