Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Add more DirectoryServices tests - 3 #24533

Merged
merged 3 commits into from
Oct 11, 2017

Conversation

tarekgh
Copy link
Member

@tarekgh tarekgh commented Oct 10, 2017

This is adding some search and negative tests

This is adding some search and negative tests
@tarekgh
Copy link
Member Author

tarekgh commented Oct 10, 2017

CC @AlexGhiondea @hughbe @karelz @danmosemsft @WinCPP

@tarekgh
Copy link
Member Author

tarekgh commented Oct 10, 2017

@tquerec next, I am going to add the test for attributes and com objects. I have started that but ran into some problems with it. I'll investigate more and will contact you if I couldn't figure out solutions. thanks for your help.

@tarekgh
Copy link
Member Author

tarekgh commented Oct 10, 2017

#24316
#24388

public void TestDirectoryEntryNegativeCases()
{
// Test invalid server path
using (DirectoryEntry de = new DirectoryEntry("SomeWrongPath"))
Copy link
Member

Choose a reason for hiding this comment

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

can you break these into separate tests? doesn't seem like they need to be in the same method.

Copy link
Member Author

Choose a reason for hiding this comment

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

@danmosemsft could you please clarify why you think these are not different test cases and need to split into different methods? All these cases are testing the negative cases (the cases which throw exceptions) with the wrong usage. I am seeing all these cases are related but I am open to split it if you can tell more details why you think so. Thanks.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have split it into smaller methods. please let me know if you have any other comment.

@WinCPP
Copy link

WinCPP commented Oct 10, 2017

@tarekgh thank you for including me. I'm sorry, I could not figure out what to pick up... is there some carved out API set or work that I could start working on...?

@tarekgh
Copy link
Member Author

tarekgh commented Oct 10, 2017

Test Linux x64 Release Build please

@tarekgh
Copy link
Member Author

tarekgh commented Oct 10, 2017

@WinCPP thanks for your willingness to help here. I am still exploring the area and trying to add basic tests which cover the main scenarios. I would suggest to you first try to get familiar how the test is working. you may look at the comment on the file https://github.com/dotnet/corefx/blob/master/src/System.DirectoryServices/tests/LDAP.Configuration.xml for some info.

I designed the test to be skipped if there is no define server configuration. And will run only if there is a server we can test against. you may try to run the tests on your side and when I come to the new namespaces, I'll try to let you know what areas you may start adding tests for. note, currently I am internally testing against 2 servers configuration, Windows server and Linux machine with OpenDJ to ensure I capture all different behaviors and ensure the test is reliable enough when running against different configurations.

Thanks again for your willingness to help here.

@tarekgh
Copy link
Member Author

tarekgh commented Oct 10, 2017

test OSX x64 Debug Build please

@tarekgh
Copy link
Member Author

tarekgh commented Oct 10, 2017

@dotnet/dnceng could you please check OSX x64 Debug Build failure?

@chcosta
Copy link
Member

chcosta commented Oct 10, 2017

@mmitche , has this issue already been dealt with? How are you handling these cases when you see them? Disable offending machines? Is there additional follow-up?

09:04:31 Cloning repository https://github.com/dotnet/corefx
09:04:31  > git init /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest # timeout=10
09:04:31 ERROR: Error cloning remote repo 'origin'
09:04:31 hudson.plugins.git.GitException: Could not init /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest

09:04:31 stderr: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun```

@tarekgh
Copy link
Member Author

tarekgh commented Oct 10, 2017

@tquerec please have a look when you have a chance. Thanks

@tarekgh tarekgh merged commit 2955f94 into dotnet:master Oct 11, 2017
@tarekgh tarekgh deleted the DirectoryServicesTests-3 branch October 11, 2017 00:42
@karelz karelz added this to the 2.1.0 milestone Oct 11, 2017
@WinCPP
Copy link

WinCPP commented Oct 15, 2017

@tarekgh Visited the OpenDJ website as per the instructions ins LDAP.Configuration.xml file. The website asks me to register giving company name. Found it a bit confusing as to what would be the legal implications for trial use.

I have got active directory installation on my local setup. Does this same config file work for AD as well?

Thanks!

@tarekgh
Copy link
Member Author

tarekgh commented Oct 16, 2017

I have got active directory installation on my local setup. Does this same config file work for AD as well?

Yes, as long as you provide the configuration info (e.g server name, port, domain) it should work.

@WinCPP
Copy link

WinCPP commented Oct 27, 2017

Hi @tarekgh, I have got ADLDS instance installed on my Windows 10 desktop. I am trying to get correct configuration of the same. I have edited the configuration.xml. But with this the tests are failing. Is this correct config? Please note that my home PC is a Windows 10 machine in work group; essentially no domain. Appreciate your inputs and if there are some steps to get this working on a desktop.

<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
    <ServerName>localhost</ServerName>
    <Domain></Domain>
    <Port>389</Port>
    <User>cn=Directory Manager</User>
    <Password>password</Password>
    <AuthenticationTypes>ServerBind,None</AuthenticationTypes>
</Configuration>

Also are there any specific steps to create a particularly named instance using ADSI Edit?

Thanks,
Mandar

@tarekgh
Copy link
Member Author

tarekgh commented Oct 27, 2017

@WinCPP I I believe you have to have a Windows Server installed with Active Directory. ADLDS you have installed on the client is just to manage the AD on the server.
If you cannot install a Windows Server with Active Directory, then OpenDJ would be the other way to install it on the Windows client.

CC @tquerec who is the expert here and can advise better regarding the needed configuration.

pjanotti pushed a commit to pjanotti/corefx that referenced this pull request Oct 31, 2017
* Add more DirectoryServices tests - 3

This is adding some search and negative tests

* Split the negative test method to smaller methods

* Add using different attribute types test
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
* Add more DirectoryServices tests - 3

This is adding some search and negative tests

* Split the negative test method to smaller methods

* Add using different attribute types test


Commit migrated from dotnet/corefx@2955f94
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.

7 participants