[zypp-devel] Simulating web access in test cases
Since we have had lot of bugs that happen only on http access and not on direct file access, I wanted to have this testable as well. I have committed a embedded web server for testcases, it is not very stable yet because I had to do some boost threads magic, but it already helps Fetcher testcase to test http access. you use it something like:: /** * * Starts a webserver to simulate remote transfers in * testcases * * \code * #include "WebServer.h" * * BOOST_AUTO_TEST_CASE(Foo) * { * * WebServer web((Pathname(TESTS_SRC_DIR) + "/datadir").c_str() ); * web.start(); * * MediaSetAccess media( Url("http://localhost:9099"), "/" ); * * // do something with the url * * * web.stop(); * * \endcode */ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
participants (1)
-
Duncan Mac-Vicar Prett