summaryrefslogtreecommitdiff
path: root/test/httpserver
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2009-04-26 18:41:41 +0000
committerChris Wilson <chris+github@qwirx.com>2009-04-26 18:41:41 +0000
commite183c60cb4c4ed9a428e71cd4804fa56241d864b (patch)
treed47a3037f27cbb1f9d4aee2dafaa2a90923806a4 /test/httpserver
parent359f7b95fc452fdbfc98fb5ba4910e40d845a684 (diff)
Fix httpserver tests on win32.
Diffstat (limited to 'test/httpserver')
-rw-r--r--test/httpserver/testhttpserver.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/test/httpserver/testhttpserver.cpp b/test/httpserver/testhttpserver.cpp
index bbefff31..160cb32f 100644
--- a/test/httpserver/testhttpserver.cpp
+++ b/test/httpserver/testhttpserver.cpp
@@ -238,7 +238,12 @@ int test(int argc, const char *argv[])
// Kill it
TEST_THAT(KillServer(pid));
- TestRemoteProcessMemLeaks("generic-httpserver.memleaks");
+
+ #ifdef WIN32
+ TEST_THAT(unlink("testfiles/httpserver.pid") == 0);
+ #else
+ TestRemoteProcessMemLeaks("generic-httpserver.memleaks");
+ #endif
// correct, official signature should succeed, with lower-case header
{
@@ -387,6 +392,7 @@ int test(int argc, const char *argv[])
TEST_EQUAL(404, response.GetResponseCode());
}
+ #ifndef WIN32 // much harder to make files inaccessible on WIN32
// Make file inaccessible, should cause server to return a 403 error,
// unless of course the test is run as root :)
{
@@ -405,6 +411,7 @@ int test(int argc, const char *argv[])
TEST_EQUAL(403, response.GetResponseCode());
TEST_THAT(chmod("testfiles/testrequests.pl", 0755) == 0);
}
+ #endif
{
HTTPRequest request(HTTPRequest::Method_GET,
@@ -461,7 +468,12 @@ int test(int argc, const char *argv[])
// Kill it
TEST_THAT(KillServer(pid));
- TestRemoteProcessMemLeaks("generic-httpserver.memleaks");
+
+ #ifdef WIN32
+ TEST_THAT(unlink("testfiles/s3simulator.pid") == 0);
+ #else
+ TestRemoteProcessMemLeaks("generic-httpserver.memleaks");
+ #endif
return 0;
}