提交 2d4bdcfe 编写于 作者: N nikitamikhaylov

file and executables

上级 c9cfdffc
......@@ -333,16 +333,16 @@ class _SourceExecutableBase(ExternalSource):
user='root')
class SourceExecutableCache(_SourceExecutableBase):
class SourceExecutableHashed(_SourceExecutableBase):
def _get_cmd(self, path):
return "cat {}".format(path)
def compatible_with_layout(self, layout):
return 'cache' not in layout.name
return 'hashed' in layout.name
class SourceExecutableHashed(_SourceExecutableBase):
class SourceExecutableCache(_SourceExecutableBase):
def _get_cmd(self, path):
return "cat - >/dev/null;cat {}".format(path)
......
......@@ -46,7 +46,7 @@ def setup_module(module):
for fname in os.listdir(DICT_CONFIG_PATH):
dictionaries.append(os.path.join(DICT_CONFIG_PATH, fname))
node = cluster.add_instance('node', main_configs=main_configs, dictionaries=dictionaries, with_cassandra=True)
node = cluster.add_instance('node', main_configs=main_configs, dictionaries=dictionaries)
def teardown_module(module):
......@@ -69,14 +69,10 @@ def started_cluster():
finally:
cluster.shutdown()
@pytest.mark.parametrize("layout_name", LAYOUTS_SIMPLE)
@pytest.mark.parametrize("layout_name", ['cache'])
def test_simple(started_cluster, layout_name):
simple_tester.execute(layout_name, node)
@pytest.mark.parametrize("layout_name", LAYOUTS_COMPLEX)
@pytest.mark.parametrize("layout_name", ['complex_key_cache'])
def test_complex(started_cluster, layout_name):
complex_tester.execute(layout_name, node)
@pytest.mark.parametrize("layout_name", LAYOUTS_RANGED)
def test_ranged(started_cluster, layout_name):
ranged_tester.execute(layout_name, node)
......@@ -46,7 +46,7 @@ def setup_module(module):
for fname in os.listdir(DICT_CONFIG_PATH):
dictionaries.append(os.path.join(DICT_CONFIG_PATH, fname))
node = cluster.add_instance('node', main_configs=main_configs, dictionaries=dictionaries, with_cassandra=True)
node = cluster.add_instance('node', main_configs=main_configs, dictionaries=dictionaries)
def teardown_module(module):
......@@ -69,14 +69,14 @@ def started_cluster():
finally:
cluster.shutdown()
@pytest.mark.parametrize("layout_name", LAYOUTS_SIMPLE)
@pytest.mark.parametrize("layout_name", ['hashed'])
def test_simple(started_cluster, layout_name):
simple_tester.execute(layout_name, node)
@pytest.mark.parametrize("layout_name", LAYOUTS_COMPLEX)
@pytest.mark.parametrize("layout_name", ['complex_key_hashed'])
def test_complex(started_cluster, layout_name):
complex_tester.execute(layout_name, node)
@pytest.mark.parametrize("layout_name", LAYOUTS_RANGED)
def test_ranged(started_cluster, layout_name):
ranged_tester.execute(layout_name, node)
......@@ -46,7 +46,7 @@ def setup_module(module):
for fname in os.listdir(DICT_CONFIG_PATH):
dictionaries.append(os.path.join(DICT_CONFIG_PATH, fname))
node = cluster.add_instance('node', main_configs=main_configs, dictionaries=dictionaries, with_mongo=True)
node = cluster.add_instance('node', main_configs=main_configs, dictionaries=dictionaries)
def teardown_module(module):
......@@ -69,11 +69,11 @@ def started_cluster():
finally:
cluster.shutdown()
@pytest.mark.parametrize("layout_name", list(set(LAYOUTS_SIMPLE).difference(set("cache, direct"))) )
@pytest.mark.parametrize("layout_name", set(LAYOUTS_SIMPLE).difference({'cache', 'direct'}) )
def test_simple(started_cluster, layout_name):
simple_tester.execute(layout_name, node)
@pytest.mark.parametrize("layout_name", list(set(LAYOUTS_SIMPLE).difference(set("complex_key_cache, complex_key_direct"))))
@pytest.mark.parametrize("layout_name", list(set(LAYOUTS_COMPLEX).difference({'complex_key_cache', 'complex_key_direct'})))
def test_complex(started_cluster, layout_name):
complex_tester.execute(layout_name, node)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册