Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Fixed LDAP crash and improved tests #1834

Merged
merged 2 commits into from
May 28, 2018
Merged

Fixed LDAP crash and improved tests #1834

merged 2 commits into from
May 28, 2018

Conversation

mssola
Copy link
Collaborator

@mssola mssola commented May 25, 2018

This PR has two somewhat related commits:

  1. A fix for Portus crashes when guessing LDAP email #1832
  2. A re-structure of LDAP tests

When guessing the email, we try to fetch the entry by calling `search`.
However, we dismissed the fact that this method could return nil
(meaning that there was an error on the request, like a SocketError). In
this case, from now on it will simply return nil.

Fixes SUSE#1832

Signed-off-by: Miquel Sabaté Solà <[email protected]>
There was a lot of unnecessary mocking that prevented us from testing
real bugs that were hidden behind all that code.

Signed-off-by: Miquel Sabaté Solà <[email protected]>
@mssola mssola requested a review from vitoravelino May 25, 2018 14:21
@mssola
Copy link
Collaborator Author

mssola commented May 25, 2018

After merging this, the first commit has to be re-adapted into v2.3 (a simply cherry-pick will not suffice since the code has changed too much).

Copy link
Contributor

@vitoravelino vitoravelino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM 👍

@mssola mssola merged commit 8005d8e into SUSE:master May 28, 2018
@mssola mssola deleted the ldap-crash branch May 28, 2018 07:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants