1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-03-05 15:05:48 +02:00

Add storage/remote test for unknown user/group name.

This commit is contained in:
David Steele 2021-06-01 17:10:15 -04:00
parent d35315aaf9
commit a97fc6e708

View File

@ -210,6 +210,11 @@ testRun(void)
storagePutP(storageNewWriteP(storagePgWrite, STRDEF("test"), .timeModified = 1555160001), BUFSTRDEF("TESTME"));
#ifdef TEST_CONTAINER_REQUIRED
storagePutP(storageNewWriteP(storagePgWrite, STRDEF("noname"), .timeModified = 1555160002), BUFSTRDEF("NONAME"));
HRN_SYSTEM_FMT("sudo chown 99999:99999 %s", strZ(storagePathP(storagePgWrite, STRDEF("noname"))));
#endif // TEST_CONTAINER_REQUIRED
// Path timestamp must be set after file is created since file creation updates it
HRN_STORAGE_TIME(storagePgWrite, NULL, 1555160000);
@ -219,6 +224,9 @@ testRun(void)
TEST_RESULT_STR_Z(
callbackData.content,
". {path, m=0750, u=" TEST_USER ", g=" TEST_GROUP "}\n"
#ifdef TEST_CONTAINER_REQUIRED
"noname {file, s=6, m=0640, t=1555160002, u=99999, g=99999}\n"
#endif // TEST_CONTAINER_REQUIRED
"test {file, s=6, m=0640, t=1555160001, u=" TEST_USER ", g=" TEST_GROUP "}\n",
"check content");
}