This page details how to setup the tests for the various providers and then run them with Maven 2.
The tests were run on Mac OS/X 10.5. The tests requiring a remote repository were pointed to a second machine running Kubuntu 7.10 and the various servers that can be installed from the system administration tool. The only exception to this is that the WebDAV and Http support was testing using Day CRX 1.4 as the server.
First, from the root directory of the project, run mvn install. This will compile all the source and test source and then run all the tests for providers that use the local file system.
Each remote service needs to have the test data placed within it's "repository". After running the maven build, the test data can be found in core/target/test-data. Each service may require a userid and password to be created. For example, to run the ftp test on a Linux system a user should be created and the test data placed within that user's home directory. See the following sections for details on each service.
Each repository should contain the following list of files for the tests to complete successfully.
write-tests read-tests read-tests/file1.txt read-tests/dir1 read-tests/dir1/file1.txt read-tests/dir1/file2.txt read-tests/dir1/file3.txt read-tests/dir1/subdir1 read-tests/dir1/subdir1/file1.txt read-tests/dir1/subdir1/file2.txt read-tests/dir1/subdir1/file3.txt read-tests/dir1/subdir2 read-tests/dir1/subdir2/file1.txt read-tests/dir1/subdir2/file2.txt read-tests/dir1/subdir2/file3.txt read-tests/dir1/subdir3 read-tests/dir1/subdir3/file1.txt read-tests/dir1/subdir3/file2.txt read-tests/dir1/subdir3/file3.txt read-tests/empty.txt read-tests/file%.txt code code/sealed code/sealed/AnotherClass.class code/ClassToLoad.class
Create a user on the system
useradd -p vfsusr -m vfsusr
ln -s /vfstest /home/vfsusr/vfstest
#
# VFSTEST
#
Alias /vfstest /vfstest/
DAVLockDB /var/lib/apache2/dav.lockDB
DAVMinTimeout 600
<Directory /vfstest>
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Location />
DAV On
Options Indexes MultiViews
AllowOverride None
AuthType Basic
AuthName vfstest_zone
AuthUserFile /etc/apache2/passwd
<Limit PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
Require user vfsusr
</Limit>
</Location>
chown vfsusr.users /var/lib/apache2
APACHE_MODULES="access actions alias auth auth_dbm autoindex cgi dir env expires include log_config mime negotiation setenvif ssl suexec userdir php4 php5 dav dav_fs"
User vfsusr Group users
htpasswd2 -cmb /etc/apache2/passwd vfsusr 'vfstest'
<profile>
<id>http</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<test.http.uri>http://vfsusr:vfstest@192.168.10.133:80/vfstest/test-data</test.http.uri>
</properties>
</profile>
<profile>
<id>webdav</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<test.webdav.uri>webdav://vfsusr:vfstest@192.168.10.133:80/vfstest/test-data</test.webdav.uri>
</properties>
</profile>
<profile>
<id>http</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<test.http.uri>http://admin:admin@192.168.10.133:7402/vfstest/test-data</test.http.uri>
</properties>
</profile>
<profile>
<id>webdav</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<test.webdav.uri>webdav://admin:admin@192.168.10.133:7402/vfstest/test-data</test.webdav.uri>
</properties>
</profile>[vfsusr] comment = VFS Test Directory path = /home/vfsusr guest ok = yes writable = yes
smbpasswd -a vfsusr
useradd -p vfsusr -m vfsusr
disable=no
write_enable=YES local_enable=YES
<profile>
<id>ftp</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<test.ftp.uri>ftp://admin:admin@192.168.10.133/vfstest/test-data</test.ftp.uri>
</properties>
</profile>