26 #include "../client/web/web_main.h"
27 #include "../client/web/web_cgame.h"
29 #define FILEPATH "save/campaign/"
30 #define FILE "unittest1.savx"
31 #define FILENAME FILEPATH FILE
77 ASSERT_TRUE(size > 0);
78 ASSERT_TRUE(
nullptr != buf);
85 ASSERT_TRUE(countAfterUpload != -1);
86 ASSERT_TRUE(countAfterUpload >= 1);
89 ASSERT_TRUE(countAfterDelete != -1);
90 ASSERT_EQ(countAfterDelete, countAfterUpload - 1);
bool Q_strnull(const char *string)
static const char * password
bool FS_FileExists(const char *filename,...)
Checks whether a file exists (not in virtual filesystem)
bool WEB_Auth(const char *username, const char *password)
Performs a web auth request.
void Com_ParseScripts(bool onlyServer)
int FS_LoadFile(const char *path, byte **buffer)
Filenames are relative to the quake search path.
const char * FS_Gamedir(void)
Called to find where to write a file (savegames, etc)
int FS_WriteFile(const void *buffer, size_t len, const char *filename)
int WEB_CGameListForUser(const char *cgameId, int category, int userId)
Shows the uploaded files for the particular cgame category and the given userid.
void WEB_InitStartup(void)
bool WEB_CGameUpload(const char *cgameId, int category, const char *filename)
Uploads a file to the server.
const char * TEST_GetStringProperty(const char *name)
static void SetUpTestCase()
bool WEB_CGameDelete(const char *cgameId, int category, const char *filename)
Deletes a user owned file on the server.
static void TearDownTestCase()
void FS_FreeFile(void *buffer)
bool WEB_CGameDownloadFromUser(const char *cgameId, int category, const char *filename, int userId)
Downloads a file from the server and store it in the user directory.