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

Ben Maurer bmaurer at ximian.com
Mon Jun 20 13:04:55 EDT 2005


On Sun, 2005-06-19 at 18:26 +0300, Boris Kirzner wrote:
> The second point is that DirectoryServices tests require environment 
> variable of (some, not necessary the default) ldap server to run on.
> So, the tests logic can possibly be: if no environment variable present, 
> test prints warning message and silently passes(or, maybe, fails?). If 
> someone wants to run this tests, he should define both environment 
> variable and a user configuration file (or configure the host running 
> these tests to act also as a default ldap server)

How about this:

We add an argument to configure.in:

--with-test-config=my_config_file.xml

This configuration file will contain a format as such:

<config>
	<service name="ldap">
		<hostname>myladpserver.boston.ximian.com</hostname>
	</service>

	<service name="mssql_database">
		<hostname>cygwin-mono.boston.ximian.com</hostname>
		<login user="sa">passw0rd</login>
		<login user="normal_user>blah</login>
	</service>
</config>

All tests that require external servers will read the config file. If
the configuration file does not exist, they will exit *with no errors*.

The advantage of this method is that all the information can be kept in
a file rather than in random env vars. It is easier to share the file
between computers.

-- Ben




More information about the Mono-devel-list mailing list