-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Add more DirectoryServices tests - 3 #24533
Conversation
This is adding some search and negative tests
CC @AlexGhiondea @hughbe @karelz @danmosemsft @WinCPP |
@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. |
public void TestDirectoryEntryNegativeCases() | ||
{ | ||
// Test invalid server path | ||
using (DirectoryEntry de = new DirectoryEntry("SomeWrongPath")) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
@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...? |
Test Linux x64 Release Build please |
@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. |
test OSX x64 Debug Build please |
@dotnet/dnceng could you please check OSX x64 Debug Build failure? |
@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?
|
@tquerec please have a look when you have a chance. Thanks |
@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! |
Yes, as long as you provide the configuration info (e.g server name, port, domain) it should work. |
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, |
@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. CC @tquerec who is the expert here and can advise better regarding the needed configuration. |
* 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
* 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
This is adding some search and negative tests