buffet: reworked http transport to prepare for unit testing
Changed the way HTTP transport classes are implemented. Now
the Transport class is a very simple factory class that just
creates an appropriate instance of http::Connection object.
http::Connection is a thin layer wrapper around underlying
transport library, such as libcurl.
Also, the Transport class is now stateless and can be used
to initiate multiple HTTP connections.
Majority of HTTP processing is done in http::Request and
http::Response classes which are not dependent on the underlying
transport.
The HTTP utility functions now take the Transport class as
a parameter to facilitate unit tesing.
Also added a stub http_utils_unittest.cc to be populated
with actual tests when the fake HTTP transport is implemented.
BUG=chromium:364733
TEST=Unit tests pass.
Change-Id: If506854d274f725bbc2d6f765f19344d8697a239
Reviewed-on: https://chromium-review.googlesource.com/196153
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/buffet/HACKING b/buffet/HACKING
index d657397..5bab79e 100644
--- a/buffet/HACKING
+++ b/buffet/HACKING
@@ -14,3 +14,11 @@
# Deploy the most recently built version of buffet to a DUT:
cros deploy --board=${BOARD} <remote host> platform2
+
+#To enable additional debug logging in buffet daemon, run it as:
+# buffet --v=<level>, where <level> is verbosity level of debug info:
+# 1 - enable additional tracing of internal object construction and destruction
+# 2 - add tracing of request and response data sent over HTTP (beware of
+# privacy concerns).
+# 3 - enable low-level CURL tracing for HTTP communication.
+buffet --v=2