Tutorial :How to test that test if a path is (or isn't) writable without writing nothing in it


Suppose you have the following subversion httpd server:


Suppose you have complex authorization rules that specify who can read where and you have written them down in the svn-access-file.conf which contain the path-based authentication configuration.

Now suppose that you would test that the configuration file is correct (without modifying the history in subversion). You can test that a location is readable by a user (e.g. alex) using something like

wget --user=alex --password=******* http://svn.mycompany.com/svn/location/that-should-readable-from-alex/  

You can test that a location is not readable by a user (e.g. bob) using something like

wget --user=bob --password=******* http://svn.mycompany.com/svn/location/that-shouldnt-readable-from-bob/  

How to test that the location is (or isn't) writable by a user?

How do that in automatized way?


Simplest way is to set up a replica (with svnhotcopy, svnsync or another way) and do the tests there.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »