Skip to content

Commit

Permalink
Fixed tls arg tests
Browse files Browse the repository at this point in the history
  • Loading branch information
filipecosta90 committed Nov 18, 2023
1 parent 9ddfcff commit 7c54740
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ jobs:
if: matrix.platform == 'ubuntu-latest'
timeout-minutes: 10
run: |
TLS_PROTOCOLS="tlsv1.2" TLS=1 ./tests/run_tests.sh
TLS_PROTOCOLS='TLSv1.2' TLS=1 ./tests/run_tests.sh
- name: Test OSS TCP TLS v1.3
if: matrix.platform == 'ubuntu-latest'
timeout-minutes: 10
run: |
TLS_PROTOCOLS="tlsv1.3" TLS=1 ./tests/run_tests.sh
TLS_PROTOCOLS='TLSv1.3' TLS=1 ./tests/run_tests.sh
- name: Test OSS-CLUSTER TCP
timeout-minutes: 10
Expand Down
4 changes: 2 additions & 2 deletions memtier_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -913,8 +913,8 @@ static int config_parse_args(int argc, char *argv[], struct benchmark_config *cf
return -1;
#endif
} else {
fprintf(stderr, "Invalid tls-protocols specified. "
"Use a combination of 'TLSv1', 'TLSv1.1', 'TLSv1.2' and 'TLSv1.3'.");
fprintf(stderr, "Invalid tls-protocols specified %s."
"Use a combination of 'TLSv1', 'TLSv1.1', 'TLSv1.2' and 'TLSv1.3'.", tls_token);
return -1;
break;
}
Expand Down
22 changes: 16 additions & 6 deletions tests/tests_oss_simple_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,10 @@ def test_default_set_get_3_runs(env):


def test_default_arbitrary_command_pubsub(env):
benchmark_specs = {"name": env.testName, "args": ['--command=publish \"__key__\" \"__data__\"']}
benchmark_specs = {"name": env.testName, "args": []}
addTLSArgs(benchmark_specs, env)
# on arbitrary command args should be the last one
benchmark_specs["args"].append('--command=publish \"__key__\" \"__data__\"')
config = get_default_memtier_config()
master_nodes_list = env.getMasterNodesList()

Expand All @@ -281,8 +283,10 @@ def test_default_arbitrary_command_pubsub(env):


def test_default_arbitrary_command_keyless(env):
benchmark_specs = {"name": env.testName, "args": ['--command=PING']}
benchmark_specs = {"name": env.testName, "args": []}
addTLSArgs(benchmark_specs, env)
# on arbitrary command args should be the last one
benchmark_specs["args"].append('--command=PING')
config = get_default_memtier_config()
master_nodes_list = env.getMasterNodesList()

Expand All @@ -301,8 +305,10 @@ def test_default_arbitrary_command_keyless(env):


def test_default_arbitrary_command_set(env):
benchmark_specs = {"name": env.testName, "args": ['--command=SET __key__ __data__']}
benchmark_specs = {"name": env.testName, "args": []}
addTLSArgs(benchmark_specs, env)
# on arbitrary command args should be the last one
benchmark_specs["args"].append('--command=SET __key__ __data__')
config = get_default_memtier_config()
master_nodes_list = env.getMasterNodesList()
overall_expected_request_count = get_expected_request_count(config)
Expand All @@ -327,8 +333,10 @@ def test_default_arbitrary_command_set(env):


def test_default_arbitrary_command_hset(env):
benchmark_specs = {"name": env.testName, "args": ['--command=HSET __key__ field1 __data__']}
benchmark_specs = {"name": env.testName, "args": []}
addTLSArgs(benchmark_specs, env)
# on arbitrary command args should be the last one
benchmark_specs["args"].append('--command=HSET __key__ field1 __data__')
config = get_default_memtier_config()
master_nodes_list = env.getMasterNodesList()
overall_expected_request_count = get_expected_request_count(config)
Expand All @@ -353,9 +361,11 @@ def test_default_arbitrary_command_hset(env):


def test_default_arbitrary_command_hset_multi_data_placeholders(env):
benchmark_specs = {"name": env.testName, "args": ['--command=HSET __key__ field1 __data__ field2 __data__ field3 __data__']}
benchmark_specs = {"name": env.testName, "args": []}
addTLSArgs(benchmark_specs, env)
config = get_default_memtier_config()
# on arbitrary command args should be the last one
benchmark_specs["args"].append('--command=HSET __key__ field1 __data__ field2 __data__ field3 __data__')
memtier_config = get_default_memtier_config()
master_nodes_list = env.getMasterNodesList()
overall_expected_request_count = get_expected_request_count(config)

Expand Down

0 comments on commit 7c54740

Please sign in to comment.