Skip to content

Commit 15e8616

Browse files
authored
Merge pull request #303 from adobe-apiplatform/v2
fix the nosetests. Prep for GM release of 2.2.2.
2 parents 59cc6a5 + 03566f1 commit 15e8616

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

RELEASE_NOTES.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Release Notes for User Sync Tool Version 2.2.2
22

3-
These notes apply to v2.2.2rc3 of 2017-11-14.
3+
These notes apply to v2.2.2 of 2017-11-19.
44

55
## New Features
66

@@ -24,10 +24,8 @@ There are no interface changes from prior versions.
2424

2525
## Known Issues
2626

27-
The nosetests are broken in this release candidate.
28-
29-
Because the release on Windows is built with a pre-compiled version of pyldap, we have to specify a specific version to be used in each release. This may not always be the latest version.
27+
Because the release on Windows is built with a pre-compiled version of pyldap, we have to specify a specific version to be used in each release (see the setup.py file for the specific version). This may not always be the latest version.
3028

3129
On the Win64 platform, there are very long pathnames embedded in the released build artifact `user-sync.pex`, which will cause problems unless you are on Windows 10 and are either running Python 3.6 or have enabled long pathnames system-wide (as described in this [Microsoft Dev Center article](https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx)). To work around this issue on older platforms, set the `PEX_ROOT` environment variable (as described [in the docs here](https://adobe-apiplatform.github.io/user-sync.py/en/user-manual/setup_and_installation.html)) to be a very short path (e.g., `set PEX_ROOT=C:\pex`).
3230

33-
Each release on each platform is built with a specific version of Python. Typically this is the latest available (from the OS vendor, if they provide one) for that platform. In general, and especially on Windows, you should use the same Python to run User Sync as it was built with.
31+
Each release on each platform is built with a specific version of Python. Typically this is the latest available for that platform (from the OS vendor, if they provide one, from [python.org](http://python.org) otherwise). In general, and especially on Windows, you should use the same Python to run User Sync as it was built with.

tests/rules_test.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ def mock_load_users_and_groups(groups=None, extended_attributes=None, all_users=
7878
# when syncing, the existing Adobe user is processsed first
7979
user = everybody[1]
8080
commands = tests.helper.create_umapi_commands(user)
81-
commands.add_groups(set([primary_group_21]))
8281
commands.remove_groups(set([primary_group_11]))
82+
commands.add_groups(set([primary_group_21]))
8383
expected_primary_commands_list.append(commands)
8484
user = everybody[0]
8585
commands = tests.helper.create_umapi_commands(user)
@@ -190,22 +190,24 @@ def _do_country_code_test(self, mock_umapi_commands, mock_connectors, identity_t
190190
if (expected_country_code):
191191
expected_result['country'] = expected_country_code
192192

193-
options = {'default_country_code': default_country_code, 'new_account_type': identity_type}
193+
options = {'default_country_code': default_country_code, 'new_account_type': identity_type}
194+
mock_info = user_sync.rules.UmapiTargetInfo('mock_primary')
194195
mock_rules = user_sync.rules.RuleProcessor(options)
196+
mock_dir_user = {'username': '[email protected]',
197+
'domain': None, 'groups': ['CCE Group 1'],
198+
'firstname': '!Openldap CCE',
199+
'country': user_country_code,
200+
'lastname': 'User1',
201+
'identity_type': identity_type,
202+
'email': '[email protected]',
203+
'uid': '001'}
195204
mock_rules.directory_user_by_user_key = {
196-
user_key: {'username': '[email protected]',
197-
'domain': None, 'groups': ['CCE Group 1'],
198-
'firstname': '!Openldap CCE',
199-
'country': user_country_code,
200-
'lastname': 'User1',
201-
'identity_type': identity_type,
202-
'email': '[email protected]',
203-
'uid': '001'}
205+
user_key: mock_dir_user
204206
}
205-
mock_rules.add_umapi_user(user_key, set(), mock_connectors)
207+
mock_rules.create_umapi_user(user_key, set(), mock_info, mock_connectors)
206208

207209
if (identity_type == 'federatedID' and default_country_code == None and user_country_code == None):
208-
mock_rules.logger.error.assert_called_with('Federated user cannot be added without a specified country code: %s', user_key)
210+
mock_rules.logger.error.assert_called_with('User cannot be added without a specified country code: %s', mock_dir_user)
209211
else:
210212
mock_umapi_commands.return_value.add_user.assert_called_with(expected_result)
211213

user_sync/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1919
# SOFTWARE.
2020

21-
__version__ = '2.2.2rc3'
21+
__version__ = '2.2.2'

0 commit comments

Comments
 (0)