Skip to content

Commit

Permalink
fix command line argument + test
Browse files Browse the repository at this point in the history
  • Loading branch information
alonre24 committed May 2, 2024
1 parent af9f9c4 commit a212ce1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion RAMP/module_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
RUN_COMMAND_LINE_ARGS = None
MIN_REDIS_VERSION = "4.0"
MIN_REDIS_PACK_VERSION = "5.2"
COMPATIBLE_REDIS_VERSION = "7.6"
COMPATIBLE_REDIS_VERSION = "7.4"
RAMP_FORMAT_VERSION = 1
CONFIG_COMMAND = ""
OVERIDE_COMMAND = [] # type: List[Dict[str, str]]
Expand Down
2 changes: 1 addition & 1 deletion RAMP/ramp.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def unpack(bundle):
@click.option('--runcmdargs', 'run_command_line_args', default=None, help='if set, use those args when running the redis server')
@click.option('--redis-min-version', '-r', 'min_redis_version', default=None, help='redis minimum version')
@click.option('--redis-pack-min-version', '-R', 'min_redis_pack_version', default=None, help='redis pack minimum version')
@click.option('--compatible_redis_version', '-R', 'compatible_redis_version', default=None, help='redis compatible version')
@click.option('--compatible_redis_version', '-cr', 'compatible_redis_version', default=None, help='redis compatible version')
@click.option('--config-command', '-cc', default=None, help='command used to configure module args at runtime')
@click.option('--os', '-O', default=None, help='build target OS (Darwin/Linux)')
@click.option('--capabilities', '-C', callback=comma_seperated_to_list, help='comma separated list of module capabilities')
Expand Down
4 changes: 3 additions & 1 deletion test.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,15 @@ def test_bundle_from_cmd():
command_line_args = "\\\"-output f --level debug\\\""
min_redis_version = "4.6"
min_redis_pack_version = "5.0"
compatible_redis_version = "7.2"
display_name = "test_module"
capability_name = "Test & Module"
module_name = "module_test"

argv = [MODULE_FILE_PATH, '-a', author, '-e', email, '-D', description,
'-d', display_name, '-b', capability_name, '-n', module_name,
'-h', homepage, '-l', _license, '-c', command_line_args,
'-r', min_redis_version, '-R', min_redis_pack_version,
'-r', min_redis_version, '-R', min_redis_pack_version, '-cr', compatible_redis_version,
'-C', ','.join([cap['name'] for cap in MODULE_CAPABILITIES]),
'-o', BUNDLE_ZIP_FILE, '-cc', CONFIG_COMMAND, '-E', 'graph.bulk',
'-E', 'graph.BULK',
Expand Down Expand Up @@ -150,6 +151,7 @@ def test_bundle_from_cmd():
assert metadata["command_line_args"] == command_line_args
assert metadata["min_redis_version"] == min_redis_version
assert metadata["min_redis_pack_version"] == min_redis_pack_version
assert metadata["compatible_redis_version"] == compatible_redis_version
assert metadata["config_command"] == CONFIG_COMMAND
assert metadata["sha256"] == sha256_checksum(MODULE_FILE_PATH)
assert len(metadata["capabilities"]) == len(MODULE_CAPABILITIES)
Expand Down

0 comments on commit a212ce1

Please sign in to comment.