Adds the concept of `resources' to the regression test utility

If a given resource is not available the test is skipped. Useful
to test operators that depends on 3rd party libraries that may
not be available, for instance: GeoIP.
This commit is contained in:
Felipe Zimmerle
2015-11-20 09:54:52 -03:00
parent 09a958544d
commit 18c862a84a
4 changed files with 60 additions and 4 deletions

View File

@@ -62,6 +62,7 @@ class RegressionTest {
std::string method;
std::string httpVersion;
std::string uri;
std::string resource;
static inline std::string yajl_array_to_str(const yajl_val &node);
static inline std::vector<std::string> yajl_array_to_vec_str(
@@ -76,7 +77,13 @@ class RegressionTest {
class RegressionTestResult {
public:
RegressionTestResult() :
passed(false),
skipped(false),
test(NULL) { }
bool passed;
bool skipped;
RegressionTest *test;
std::stringstream reason;
};