Mailinglist Archive: zypp-devel (53 mails)

< Previous Next >
[zypp-devel] Simulating web access in test cases
  • From: Duncan Mac-Vicar Prett <dmacvicar@xxxxxxx>
  • Date: Fri, 17 Oct 2008 16:26:33 +0200
  • Message-id: <48F8A099.4040207@xxxxxxx>

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@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages