From 3d1cb7ef111cbd5724262077702e0dc2a3d6998d Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 6 Jun 2012 23:12:11 -0400 Subject: MAINT-1144: Re-enable skipped LLHTTPClient tests with local server. Over the years we've skipped more and more of the tests in llhttpclient_test.cpp (nee llhttpclient_tut.cpp) because they've relied on particular behaviors from Internet sites not under our control. We skipped a test that fetches llsd+xml from secondlife.com because "secondlife.com is not reliable enough for unit tests." We skipped a test that tries to observe a failure with "http://www.invalid" because some local ISPs turn "no such domain" DNS errors into valid pages offering the requester to buy the specified domain name. Today we've had to skip tests attempting to contact "http://www.google.com" for reasons we haven't yet diagnosed, but that probably have to do with Google's IPv6 rollout. Use local temp server test_llsdmessage_peer.py as the success destination, eliminating DNS, Internet access and remote server behavior as failure modes. Use idle localhost port for failure test. Re-enable all skipped LLHTTPClient tests! Re-enable on Windows! In support of these tests, modify test_llsdmessage_peer.py: Support HEAD as no-data variant of GET. Change GET result dict to avoid resembling an error response -- confusing. Make GET/POST return actual dict rather than undecorated string "success". Because of that last, change llcapabilitylistener_test.cpp and llsdmessage_test.cpp to extract "reply" key from response rather than expecting response to be a string itself. --- indra/newview/tests/llcapabilitylistener_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/tests/llcapabilitylistener_test.cpp b/indra/newview/tests/llcapabilitylistener_test.cpp index 2ad08dc1f3..e1cbd28f92 100644 --- a/indra/newview/tests/llcapabilitylistener_test.cpp +++ b/indra/newview/tests/llcapabilitylistener_test.cpp @@ -156,7 +156,7 @@ namespace tut regionPump.post(request); ensure("got response", netio.pump()); ensure("success response", success); - ensure_equals(result.asString(), "success"); + ensure_equals(result["reply"].asString(), "success"); body["status"] = 499; body["reason"] = "custom error message"; -- cgit v1.2.3