[Mono-devel-list] Tests for System.DirectoryServices

Sébastien Pouliot spouliot at videotron.ca
Tue Apr 5 08:10:15 EDT 2005


Hello Boris,

I don't have any problem with configuration files as long as:

1- the tests don't fail if the config is missing (they should be ignored);
2- that instructions are commited in SVN to instruct anyone how to build
such file;

However I don't like using the machine.config file for this as it is runtime
specific. I.e. it requires the config for all mono installations (e.g.
1.0.x, 1.1.x, SVN) and all MS Fx installed (1.0/1.1/2.0 betas). So on my two
computers that's a lot of similar changes.

Sebastien Pouliot
home: spouliot at videotron.ca
blog: http://pages.infinit.net/ctech/poupou.html


> -----Original Message-----
> From: mono-devel-list-admin at lists.ximian.com
> [mailto:mono-devel-list-admin at lists.ximian.com]On Behalf Of Boris
> Kirzner
> Sent: 4 avril 2005 09:34
> To: spouliot at videotron.ca
> Cc: MONO
> Subject: Re: [Mono-devel-list] Tests for System.DirectoryServices
>
>
> Hello all
> Sorry for the previous mail, I succeeded to introduce my idea in
> completely non-understandable way.
>
> The idea is to put the "default" server name into application settings
> at _machine.config level_, enable overriding this on "app.config_ level
> for particular application.
> The tests will override it and, additionally, put the "usual" serve name
> into app.config.
>
> Thanks,
> Boris
>
> Boris Kirzner wrote:
>
> > Hello Sebastian,
> > While working on the tests for System.DirectoryServices I found that
> > we need the tests to use more that single parameter for LDAP server.
> > As I can see this at this point, it should be at least two parameters
> > fro LDAP servers :
> > - First,  for "usual" server, the tests should interact with
> > - Second, the "default" server, for testing methods and properties
> > that assume system knowledge about existing LDAP server on the network
> > (RootDSN, default constructors, etc.)
> > and, probably, each of this servers should also hold port number( or,
> > alternatively, we can embed the port number into server root).
> >
> > So my suggestion is to store server names inside application settings
> > and not into environment variables, so the tests will be more portable
> > and independent from testing environment.
> >
> > What is our opinion on this issue?
> >
> > Thank you in advance,
> > Boris
> >
> > Sébastien Pouliot wrote:
> >
> >>Hello Boris,
> >>
> >>Nice tests :-)
> >>
> >>I would suggest a few things...
> >>
> >>1. Network tests generally takes a long time to execute. Such
> (or most) test
> >>in other assemblies have been given a
> >>[Category ("InetAccess")]
> >>either on the [Test]ed method or on the class (the [TestFixture]) if all
> >>tests requires network access.
> >>
> >>2. Hardcoding the LDAP server seems a bad idea as it will
> requires anyone
> >>using the tests to make local modifications to many source files.
> >>What about keeping the server name in an environment variable ? e.g.
> >>MONO_LDAP_TEST_SERVER ?
> >>
> >>3. Another advantage of using an environment variable is that
> it would be
> >>possible to ignore all the tests (or some of them) if the environment
> >>variable isn't present. I'm doing something similar for the CAS
> tests - i.e.
> >>if the security manager is not enabled then all CAS tests are ignore.
> >>
> >>This can be put the [SetUp] or [TestFixtureSetUp]
> >>
> >>LDAPServer = Environment.GetVariable ("MONO_LDAP_TEST_SERVER");
> >>if (LDAPServer == null) {
> >>	Assert.Ignore ("No LDAP test server configured with
> >>MONO_LDAP_TEST_SERVER");
> >>	return;
> >>}
> >>
> >>
> >>Thanks,
> >>
> >>Sebastien Pouliot
> >>home: spouliot at videotron.ca
> >>blog: http://pages.infinit.net/ctech/poupou.html
> >>
> >>
> >>
> >>
> >>>-----Original Message-----
> >>>From: mono-devel-list-admin at lists.ximian.com
> >>>[mailto:mono-devel-list-admin at lists.ximian.com]On Behalf Of Boris
> >>>Kirzner
> >>>Sent: 17 mars 2005 04:20
> >>>To: mono-devel-list at lists.ximian.com; mono-hackers-list at ximian.com
> >>>Subject: [Mono-devel-list] [Mono-devel-list][Mono-hackers-list] Tests
> >>>for DirectoryServices
> >>>
> >>>
> >>>Hello all
> >>>Attached is the test for DirectoryServices.DirectoryEntry class.
> >>>I tried to make the test self-contained as possible, but it still
> >>>assumes OpenLDAP server is up and running.
> >>>Note - for the test to run you need to change the server name in the
> >>>test body.
> >>>Additionally attached is a slapd.conf of the OpenLDAP server.
> >>>
> >>>If no one objects, I'm going to commit.
> >>>
> >>>Thanks
> >>>Boris
> >>>
> >>>--
> >>>Boris Kirzner
> >>>Mainsoft Corporation
> >>>http://www.mainsoft.com
> >>>
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >
> >--
> >Boris Kirzner
> >Mainsoft Corporation
> >http://www.mainsoft.com
> >
>
> --
> Boris Kirzner
> Mainsoft Corporation
> http://www.mainsoft.com
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list