summaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/testing_api_cmd_testserver.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/testing/testing_api_cmd_testserver.c b/src/testing/testing_api_cmd_testserver.c
index 0becdbde..77f0e692 100644
--- a/src/testing/testing_api_cmd_testserver.c
+++ b/src/testing/testing_api_cmd_testserver.c
@@ -93,6 +93,7 @@ handle_post (void *cls,
(void) content_type;
(void) transfer_encoding;
(void) off;
+
return MHD_YES;
}
@@ -270,6 +271,27 @@ testserver_cleanup (void *cls,
}
+static int
+traits_testserver (void *cls,
+ const void **ret,
+ const char *trait,
+ unsigned int index)
+{
+ struct TestserverState *ser = cls;
+ struct TALER_TESTING_Trait traits[] = {
+ TALER_TESTING_make_trait_url (&ser->url),
+ TALER_TESTING_make_trait_http_method (&ser->http_method),
+ TALER_TESTING_make_trait_header_template (&ser->header),
+ TALER_TESTING_make_trait_body_template (&ser->body),
+ TALER_TESTING_trait_end (),
+ };
+
+ return TALER_TESTING_get_trait (traits,
+ ret,
+ trait,
+ index);
+}
+
/**
* This function is used to start the web server.
*
@@ -289,7 +311,8 @@ TALER_TESTING_cmd_testserver (const char *label,
.cls = ser,
.label = label,
.run = &testserver_run,
- .cleanup = &testserver_cleanup
+ .cleanup = &testserver_cleanup,
+ .traits = &traits_testserver
};
return cmd;
@@ -297,28 +320,6 @@ TALER_TESTING_cmd_testserver (const char *label,
}
-static int
-traits_testserver (void *cls,
- const void **ret,
- const char *trait,
- unsigned int index)
-{
- struct TestserverState *ser = cls;
- struct TALER_TESTING_Trait traits[] = {
- TALER_TESTING_make_trait_url (&ser->url),
- TALER_TESTING_make_trait_http_method (&ser->http_method),
- TALER_TESTING_make_trait_header_template (&ser->header),
- TALER_TESTING_make_trait_body_template (&ser->body),
- TALER_TESTING_trait_end (),
- };
-
- return TALER_TESTING_get_trait (traits,
- ret,
- trait,
- index);
-}
-
-
/**
* This function is used to check the web server
*
@@ -351,7 +352,6 @@ TALER_TESTING_cmd_checkserver (const char *label,
.label = label,
.run = &testserver_run,
.cleanup = &testserver_cleanup,
- .traits = &traits_testserver
};
return cmd;