diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d15e01..3e248d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,7 @@ on: [push, pull_request] jobs: build-ubuntu-latest: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: diff --git a/tst/integration/rdb_rejson/README.md b/tst/integration/rdb_rejson/README.md deleted file mode 100644 index 7bd74c0..0000000 --- a/tst/integration/rdb_rejson/README.md +++ /dev/null @@ -1,24 +0,0 @@ -#### How to create rdb file for a new ReJSON release? - -e.g., testing RDB compatibility with rejson 2.2.0. - -1. Run docker image redis-stack: - ```text - docker run -d -p 6379:6379 --name rejson redislabs/rejson:2.2.0 - ``` -2. Load store.json and create a key named "store": - ```text - python3 utils/load_1file_hostport.py tst/integration/data/store.json store - ``` -3. Save rdb: - ```text - valkey-cli save - ``` -4. Copy out the RDB file: - ```text - docker cp $(docker ps -q):/data/dump.rdb tst/integration/rdb_rejson/rejson-.rdb - ``` -5. run test_json_rdb_import.py: - ```text - TEST_PATTERN=test_import_rejson_rdbs make test - ``` diff --git a/tst/integration/rdb_rejson/rejson-1.0.8.rdb b/tst/integration/rdb_rejson/rejson-1.0.8.rdb deleted file mode 100644 index d9bda11..0000000 Binary files a/tst/integration/rdb_rejson/rejson-1.0.8.rdb and /dev/null differ diff --git a/tst/integration/rdb_rejson/rejson-2.0.11.rdb b/tst/integration/rdb_rejson/rejson-2.0.11.rdb deleted file mode 100644 index ddc4817..0000000 Binary files a/tst/integration/rdb_rejson/rejson-2.0.11.rdb and /dev/null differ diff --git a/tst/integration/rdb_rejson/rejson-2.0.6.rdb b/tst/integration/rdb_rejson/rejson-2.0.6.rdb deleted file mode 100644 index 03fcd3f..0000000 Binary files a/tst/integration/rdb_rejson/rejson-2.0.6.rdb and /dev/null differ diff --git a/tst/integration/rdb_rejson/rejson-2.0.7.rdb b/tst/integration/rdb_rejson/rejson-2.0.7.rdb deleted file mode 100644 index 4e30e37..0000000 Binary files a/tst/integration/rdb_rejson/rejson-2.0.7.rdb and /dev/null differ diff --git a/tst/integration/rdb_rejson/rejson-2.0.8.rdb b/tst/integration/rdb_rejson/rejson-2.0.8.rdb deleted file mode 100644 index df7787b..0000000 Binary files a/tst/integration/rdb_rejson/rejson-2.0.8.rdb and /dev/null differ diff --git a/tst/integration/rdb_rejson/rejson-2.2.0.rdb b/tst/integration/rdb_rejson/rejson-2.2.0.rdb deleted file mode 100644 index 50a2d1e..0000000 Binary files a/tst/integration/rdb_rejson/rejson-2.2.0.rdb and /dev/null differ diff --git a/tst/integration/rdb_rejson/rejson-2.6.12.rdb b/tst/integration/rdb_rejson/rejson-2.6.12.rdb deleted file mode 100644 index eb9e8e2..0000000 Binary files a/tst/integration/rdb_rejson/rejson-2.6.12.rdb and /dev/null differ diff --git a/tst/integration/test_rdb.py b/tst/integration/test_rdb.py index bdad286..246cc63 100644 --- a/tst/integration/test_rdb.py +++ b/tst/integration/test_rdb.py @@ -34,31 +34,3 @@ class TestRdb(JsonTestCase): assert True == client.execute_command('save') client.execute_command('FLUSHDB') assert b'OK' == client.execute_command('DEBUG', 'RELOAD', 'NOSAVE') - - def test_import_rejson_rdbs(self): - ''' - Verify we can load RDBs generated from ReJSON. - Each RDB file contains JSON key "store" (data/store.json). - ''' - self.load_rdbs_from_dir('rdb_rejson') - - def load_rdbs_from_dir(self, dir): - src_dir = os.getenv('SOURCE_DIR') - rdb_dir = f"{src_dir}/tst/integration/{dir}" - assert os.path.exists(rdb_dir) - for (dirpath, dirnames, filenames) in os.walk(rdb_dir): - for filename in filenames: - if pathlib.Path(filename).suffix == '.rdb': - file_path = os.path.join(dirpath, filename) - self.load_rdb_file(file_path, filename) - - def load_rdb_file(self, rdb_path, rdb_name): - new_path = os.path.join(self.testdir, rdb_name) - os.system(f"cp -f {rdb_path} {new_path}") - logging.info(f"Loading RDB file {new_path}") - self.client.execute_command(f"config set dbfilename {rdb_name}") - self.client.execute_command("debug reload nosave") - self.verify_keys_in_rejson_rdb() - - def verify_keys_in_rejson_rdb(self): - assert b'["The World Almanac and Book of Facts 2021"]' == self.client.execute_command('json.get', 'store', '$..books[?(@.price>10&&@.price<22&&@.isbn)].title')