mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
Add customize config tests (#9965)
Signed-off-by: yanliang567 <yanliang.qiao@zilliz.com>
This commit is contained in:
parent
dbc7ae4f55
commit
39a5e98651
3
tests/python_client/customize/README.md
Normal file
3
tests/python_client/customize/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
Verify user is able to easily customize Milvus deployment with various configuration items.
|
||||
|
||||
To be updated...
|
||||
32
tests/python_client/customize/config_parser.py
Normal file
32
tests/python_client/customize/config_parser.py
Normal file
@ -0,0 +1,32 @@
|
||||
from benedict import benedict
|
||||
from common.common_func import gen_unique_str
|
||||
from utils.util_log import test_log as log
|
||||
|
||||
|
||||
def update_configs(yaml):
|
||||
if not isinstance(yaml, dict):
|
||||
log.error("customize configurations must be in dict type")
|
||||
return None
|
||||
|
||||
template_yaml = 'template/default.yaml'
|
||||
_configs = benedict.from_yaml(template_yaml)
|
||||
|
||||
for key in yaml.keys():
|
||||
_configs[key] = yaml[key]
|
||||
|
||||
filename = gen_unique_str('cus_config')
|
||||
customized_yaml = f'template/{filename}.yaml'
|
||||
|
||||
customized_yaml = _configs.to_yaml(filepath=customized_yaml)
|
||||
return customized_yaml
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
cus_configs = {'spec.components.image': 'milvusdb/milvus-dev:master-latest',
|
||||
'metadata.namespace': 'qa-milvus',
|
||||
'spec.components.dataNode.replicas': 2,
|
||||
'spec.components.queryNode.replicas': 2,
|
||||
'spec.components.queryNode.resources.limits.memory': '2048Mi'
|
||||
}
|
||||
update_configs(cus_configs)
|
||||
1
tests/python_client/customize/requirements.txt
Normal file
1
tests/python_client/customize/requirements.txt
Normal file
@ -0,0 +1 @@
|
||||
python-benedict==0.24.3
|
||||
10
tests/python_client/customize/template/default.yaml
Normal file
10
tests/python_client/customize/template/default.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
apiVersion: milvus.io/v1alpha1
|
||||
kind: MilvusCluster
|
||||
metadata:
|
||||
name: my-release
|
||||
labels:
|
||||
app: milvus
|
||||
spec:
|
||||
config: {}
|
||||
components: {}
|
||||
dependencies: {}
|
||||
28
tests/python_client/customize/test_simd_compat.py
Normal file
28
tests/python_client/customize/test_simd_compat.py
Normal file
@ -0,0 +1,28 @@
|
||||
import pytest
|
||||
|
||||
from pymilvus import connections
|
||||
from utils.util_log import test_log as log
|
||||
from chaos import chaos_commons as cc
|
||||
from common.common_type import CaseLabel
|
||||
|
||||
|
||||
supported_simd_types = ["sse4_2", "avx", "avx2", "avx512"]
|
||||
|
||||
|
||||
class TestSimdCompatibility:
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L3)
|
||||
@pytest.mark.parametrize('simd', ["sse4_2", "avx", "avx2", "avx512"])
|
||||
def test_simd_compat(self, simd):
|
||||
"""
|
||||
steps
|
||||
1. set up milvus with customized simd configured
|
||||
2. verify milvus is working well
|
||||
3. verify milvus is running against the configured simd
|
||||
4. clear the env
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user