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

Deadly 提交于 2019-12-24 10:47:28

问题


Suppose you have the following subversion httpd server:

http://svn.mycompany.com/svn/<project-name>

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?


回答1:


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



来源:https://stackoverflow.com/questions/819900/how-to-test-that-test-if-a-path-is-or-isnt-writable-without-writing-nothing-i

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!