mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-01-30 05:39:12 +02:00
Minor improvements to storage/s3 unit test.
This commit is contained in:
parent
e46eeefada
commit
974cc10b90
@ -28,7 +28,7 @@ typedef struct TestRequestParam
|
|||||||
#define testRequestP(s3, verb, uri, ...) \
|
#define testRequestP(s3, verb, uri, ...) \
|
||||||
testRequest(s3, verb, uri, (TestRequestParam){VAR_PARAM_INIT, __VA_ARGS__})
|
testRequest(s3, verb, uri, (TestRequestParam){VAR_PARAM_INIT, __VA_ARGS__})
|
||||||
|
|
||||||
void
|
static void
|
||||||
testRequest(Storage *s3, const char *verb, const char *uri, TestRequestParam param)
|
testRequest(Storage *s3, const char *verb, const char *uri, TestRequestParam param)
|
||||||
{
|
{
|
||||||
// Add authorization string
|
// Add authorization string
|
||||||
@ -91,7 +91,7 @@ typedef struct TestResponseParam
|
|||||||
#define testResponseP(...) \
|
#define testResponseP(...) \
|
||||||
testResponse((TestResponseParam){VAR_PARAM_INIT, __VA_ARGS__})
|
testResponse((TestResponseParam){VAR_PARAM_INIT, __VA_ARGS__})
|
||||||
|
|
||||||
void
|
static void
|
||||||
testResponse(TestResponseParam param)
|
testResponse(TestResponseParam param)
|
||||||
{
|
{
|
||||||
// Set code to 200 if not specified
|
// Set code to 200 if not specified
|
||||||
@ -378,14 +378,14 @@ testRun(void)
|
|||||||
HARNESS_FORK_CHILD_BEGIN(0, true)
|
HARNESS_FORK_CHILD_BEGIN(0, true)
|
||||||
{
|
{
|
||||||
TEST_RESULT_VOID(
|
TEST_RESULT_VOID(
|
||||||
hrnTlsServerRun(ioHandleReadNew(strNew("test server read"), HARNESS_FORK_CHILD_READ(), 5000)),
|
hrnTlsServerRun(ioHandleReadNew(strNew("s3 server read"), HARNESS_FORK_CHILD_READ(), 5000)),
|
||||||
"s3 server begin");
|
"s3 server begin");
|
||||||
}
|
}
|
||||||
HARNESS_FORK_CHILD_END();
|
HARNESS_FORK_CHILD_END();
|
||||||
|
|
||||||
HARNESS_FORK_PARENT_BEGIN()
|
HARNESS_FORK_PARENT_BEGIN()
|
||||||
{
|
{
|
||||||
hrnTlsClientBegin(ioHandleWriteNew(strNew("test client write"), HARNESS_FORK_PARENT_WRITE_PROCESS(0)));
|
hrnTlsClientBegin(ioHandleWriteNew(strNew("s3 client write"), HARNESS_FORK_PARENT_WRITE_PROCESS(0)));
|
||||||
|
|
||||||
Storage *s3 = storageS3New(
|
Storage *s3 = storageS3New(
|
||||||
path, true, NULL, bucket, endPoint, storageS3UriStyleHost, region, accessKey, secretAccessKey, NULL, 16, 2,
|
path, true, NULL, bucket, endPoint, storageS3UriStyleHost, region, accessKey, secretAccessKey, NULL, 16, 2,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user