mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-01-18 04:58:51 +02:00
Update test to work with different collations.
The data returned by the protocol has not been sorted yet so it is vulnerable to differences in collation. Multiple records are not needed for this test so limit it to one path to solve this issue.
This commit is contained in:
parent
0e1612cda1
commit
af17bc4b6d
@ -291,7 +291,14 @@ testRun(void)
|
||||
"check content");
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------------------------
|
||||
TEST_TITLE("check protocol function directly with a file");
|
||||
TEST_TITLE("check protocol function directly with a path");
|
||||
|
||||
// Remove the file since ordering cannot be guaranteed in the protocol results
|
||||
storageRemoveP(storageRemote, STRDEF("test"), .errorOnMissing = true);
|
||||
|
||||
// Path timestamp must be set after file is removed since file removal updates it
|
||||
utimeTest = (struct utimbuf){.actime = 1000000000, .modtime = 1555160000};
|
||||
THROW_ON_SYS_ERROR(utime(strZ(storagePathP(storageRemote, NULL)), &utimeTest) != 0, FileWriteError, "unable to set time");
|
||||
|
||||
VariantList *paramList = varLstNew();
|
||||
varLstAdd(paramList, varNewStrZ(hrnReplaceKey("{[path]}/repo")));
|
||||
@ -302,7 +309,6 @@ testRun(void)
|
||||
strNewBuf(serverWrite),
|
||||
hrnReplaceKey(
|
||||
".\".\"\n.1\n.1555160000\n.{[user-id]}\n.\"{[user]}\"\n.{[group-id]}\n.\"{[group]}\"\n.488\n"
|
||||
".\"test\"\n.0\n.1555160001\n.6\n.{[user-id]}\n.\"{[user]}\"\n.{[group-id]}\n.\"{[group]}\"\n.416\n"
|
||||
".\n"
|
||||
"{\"out\":true}\n"),
|
||||
"check result");
|
||||
|
Loading…
x
Reference in New Issue
Block a user