|
Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
#include "util/webserver.h"#include "common/init.h"#include <gtest/gtest.h>#include <string>#include <boost/asio.hpp>#include <boost/bind.hpp>#include <boost/lexical_cast.hpp>#include <gutil/strings/substitute.h>#include "common/names.h"Go to the source code of this file.
Functions | |
| DECLARE_int32 (webserver_port) | |
| DECLARE_string (webserver_password_file) | |
| Status | HttpGet (const string &host, const int32_t &port, const string &url_path, ostream *out, int expected_code=200) |
| TEST (Webserver, SmokeTest) | |
| void | AssertArgsCallback (bool *success, const Webserver::ArgumentMap &args, Document *document) |
| TEST (Webserver, ArgsTest) | |
| void | JsonCallback (bool always_text, const Webserver::ArgumentMap &args, Document *document) |
| TEST (Webserver, JsonTest) | |
| TEST (Webserver, EscapingTest) | |
| TEST (Webserver, EscapeErrorUriTest) | |
| TEST (Webserver, StartWithPasswordFileTest) | |
| TEST (Webserver, StartWithMissingPasswordFileTest) | |
| int | main (int argc, char **argv) |
Variables | |
| const string | TEST_ARG = "test-arg" |
| const string | SALUTATION_KEY = "Salutation" |
| const string | SALUTATION_VALUE = "Hello!" |
| const string | TO_ESCAPE_KEY = "ToEscape" |
| const string | TO_ESCAPE_VALUE = "<script language='javascript'>" |
| const string | ESCAPED_VALUE = "<script language='javascript'>" |
| void AssertArgsCallback | ( | bool * | success, |
| const Webserver::ArgumentMap & | args, | ||
| Document * | document | ||
| ) |
| DECLARE_int32 | ( | webserver_port | ) |
| DECLARE_string | ( | webserver_password_file | ) |
| Status HttpGet | ( | const string & | host, |
| const int32_t & | port, | ||
| const string & | url_path, | ||
| ostream * | out, | ||
| int | expected_code = 200 |
||
| ) |
Definition at line 44 of file webserver-test.cc.
References impala::Status::OK.
Referenced by TEST().
| void JsonCallback | ( | bool | always_text, |
| const Webserver::ArgumentMap & | args, | ||
| Document * | document | ||
| ) |
Definition at line 117 of file webserver-test.cc.
References impala::Webserver::ENABLE_RAW_JSON_KEY, SALUTATION_KEY, SALUTATION_VALUE, TO_ESCAPE_KEY, and TO_ESCAPE_VALUE.
Referenced by TEST().
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 216 of file webserver-test.cc.
References impala::TestInfo::BE_TEST, and impala::InitCommonRuntime().
| TEST | ( | Webserver | , |
| SmokeTest | |||
| ) |
Definition at line 86 of file webserver-test.cc.
References HttpGet(), impala::Status::ok(), and impala::Webserver::Start().
| TEST | ( | Webserver | , |
| ArgsTest | |||
| ) |
Definition at line 99 of file webserver-test.cc.
References AssertArgsCallback(), HttpGet(), impala::Status::ok(), impala::Webserver::RegisterUrlCallback(), impala::Webserver::Start(), and TEST_ARG.
| TEST | ( | Webserver | , |
| JsonTest | |||
| ) |
Definition at line 128 of file webserver-test.cc.
References HttpGet(), JsonCallback(), impala::Status::ok(), impala::Webserver::RegisterUrlCallback(), SALUTATION_KEY, SALUTATION_VALUE, and impala::Webserver::Start().
| TEST | ( | Webserver | , |
| EscapingTest | |||
| ) |
Definition at line 170 of file webserver-test.cc.
References ESCAPED_VALUE, HttpGet(), JsonCallback(), impala::Status::ok(), impala::Webserver::RegisterUrlCallback(), impala::Webserver::Start(), and TO_ESCAPE_VALUE.
| TEST | ( | Webserver | , |
| EscapeErrorUriTest | |||
| ) |
Definition at line 183 of file webserver-test.cc.
References HttpGet(), impala::Status::ok(), and impala::Webserver::Start().
| TEST | ( | Webserver | , |
| StartWithPasswordFileTest | |||
| ) |
Definition at line 194 of file webserver-test.cc.
References HttpGet(), impala::Status::ok(), and impala::Webserver::Start().
| TEST | ( | Webserver | , |
| StartWithMissingPasswordFileTest | |||
| ) |
Definition at line 207 of file webserver-test.cc.
References impala::Status::ok(), and impala::Webserver::Start().
| const string ESCAPED_VALUE = "<script language='javascript'>" |
Definition at line 40 of file webserver-test.cc.
Referenced by TEST().
| const string SALUTATION_KEY = "Salutation" |
Definition at line 36 of file webserver-test.cc.
Referenced by JsonCallback(), and TEST().
| const string SALUTATION_VALUE = "Hello!" |
Definition at line 37 of file webserver-test.cc.
Referenced by JsonCallback(), and TEST().
| const string TEST_ARG = "test-arg" |
Definition at line 35 of file webserver-test.cc.
Referenced by AssertArgsCallback(), and TEST().
| const string TO_ESCAPE_KEY = "ToEscape" |
Definition at line 38 of file webserver-test.cc.
Referenced by JsonCallback().
| const string TO_ESCAPE_VALUE = "<script language='javascript'>" |
Definition at line 39 of file webserver-test.cc.
Referenced by JsonCallback(), and TEST().