Skip to content

Commit

Permalink
fix CI to run with RDB v11
Browse files Browse the repository at this point in the history
  • Loading branch information
moticless committed Jul 16, 2023
1 parent e854853 commit 239bfbf
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
Empty file added .MOTI_FILES/draft.txt
Empty file.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
sudo make install
# Install redis for tests against external Redis server
cd ~
git clone --branch 7.0.11 https://github.com/redis/redis.git
git clone --branch 7.2 https://github.com/redis/redis.git
cd redis
make
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Run CLI extension of this library and parse RDB file to json (might need

Run CLI extension to generate RESP commands

% ./bin/rdb-cli ./test/dumps/single_list.rdb resp
% ./bin/rdb-cli ./test/dumps/multiple_lists_strings.rdb resp
*3
$5
RPUSH
Expand All @@ -46,7 +46,7 @@ Run CLI extension to generate RESP commands

Run against Redis server, say, on address 127.0.0.1:6379, and upload RDB file:

% ./bin/rdb-cli ./test/dumps/single_list.rdb redis -h 127.0.0.1 -p 6379
% ./bin/rdb-cli ./test/dumps/multiple_lists_strings.rdb redis -h 127.0.0.1 -p 6379

(rdb-cli usage available [here](#rdb-cli usage).)

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion test/test_pause.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ static void test_pause_by_handlers_callback(void **state) {
RdbHandlersRawCallbacks cb = { .handleAuxField = handle_pause_aux_field_pause };
RdbParser *parser = RDB_createParserRdb(NULL);
RDB_setLogLevel(parser, RDB_LOG_ERROR);
assert_non_null(RDBX_createReaderFile(parser, "./test/dumps/single_list.rdb"));
assert_non_null(RDBX_createReaderFile(parser, "./test/dumps/quicklist2_v11.rdb"));
assert_non_null(RDB_createHandlersRaw(parser, &cb, user_data, NULL));

while ((status = RDB_parse(parser)) != RDB_STATUS_OK) {
Expand Down
6 changes: 3 additions & 3 deletions test/test_rdb_to_json.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,18 +145,18 @@ static void test_r2j_quicklist_raw(void **state) {

static void test_r2j_single_list_data(void **state) {
UNUSED(state);
testRdbToJsonCommon(DUMP_FOLDER("single_list.rdb"), DUMP_FOLDER("single_list_data.json"), RDB_LEVEL_DATA);
testRdbToJsonCommon(DUMP_FOLDER("quicklist2_v11.rdb"), DUMP_FOLDER("single_list_data.json"), RDB_LEVEL_DATA);
}

static void test_r2j_single_list_struct(void **state) {
UNUSED(state);

testRdbToJsonCommon(DUMP_FOLDER("single_list.rdb"), DUMP_FOLDER("single_list_struct.json"), RDB_LEVEL_STRUCT);
testRdbToJsonCommon(DUMP_FOLDER("quicklist2_v11.rdb"), DUMP_FOLDER("single_list_struct.json"), RDB_LEVEL_STRUCT);
}

static void test_r2j_single_list_raw (void **state) {
UNUSED(state);
testRdbToJsonCommon(DUMP_FOLDER("single_list.rdb"), DUMP_FOLDER("single_list_raw.json"), RDB_LEVEL_RAW);
testRdbToJsonCommon(DUMP_FOLDER("quicklist2_v11.rdb"), DUMP_FOLDER("single_list_raw.json"), RDB_LEVEL_RAW);
}

static void test_r2j_multiple_lists_and_strings_data (void **state) {
Expand Down
2 changes: 1 addition & 1 deletion test/test_rdb_to_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ static void test_rdb_to_loader_single_string(void **state) {

static void test_rdb_to_loader_single_list(void **state) {
UNUSED(state);
test_rdb_to_loader_common(DUMP_FOLDER("single_list.rdb"), 0 /*pipelineDepth default*/);
test_rdb_to_loader_common(DUMP_FOLDER("quicklist2_v11.rdb"), 0 /*pipelineDepth default*/);
}

static void test_rdb_to_loader_multiple_lists_strings(void **state) {
Expand Down
4 changes: 2 additions & 2 deletions test/test_rdb_to_resp.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ static void test_r2r_single_list_exact_match(void **state) {
memset(&r2rConf, 0, sizeof(r2rConf));
r2rConf.supportRestore = 1;
r2rConf.restore.dstRdbVersion = 6;
testRdbToRespCommon(DUMP_FOLDER("single_list.rdb"), &r2rConf, expResp, 0, 1);
testRdbToRespCommon(DUMP_FOLDER("quicklist2_v11.rdb"), &r2rConf, expResp, 0, 1);
}

static void test_r2r_quicklist(void **state) {
Expand Down Expand Up @@ -180,7 +180,7 @@ static void test_r2r_single_list_restore(void **state) {
memset(&r2rConf, 0, sizeof(r2rConf));
r2rConf.supportRestore = 1;
r2rConf.restore.dstRdbVersion = 11;
testRdbToRespCommon(DUMP_FOLDER("single_list.rdb"), &r2rConf, (char *) restorePrefix, 1, 1);
testRdbToRespCommon(DUMP_FOLDER("quicklist2_v11.rdb"), &r2rConf, (char *) restorePrefix, 1, 1);
}

static void test_r2r_multiple_lists_and_strings(void **state) {
Expand Down

0 comments on commit 239bfbf

Please sign in to comment.