diff --git a/tests/python_client/customize/README.md b/tests/python_client/customize/README.md new file mode 100644 index 0000000000..ebbc013a3a --- /dev/null +++ b/tests/python_client/customize/README.md @@ -0,0 +1,3 @@ +Verify user is able to easily customize Milvus deployment with various configuration items. + +To be updated... \ No newline at end of file diff --git a/tests/python_client/customize/config_parser.py b/tests/python_client/customize/config_parser.py new file mode 100644 index 0000000000..24920e619d --- /dev/null +++ b/tests/python_client/customize/config_parser.py @@ -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) diff --git a/tests/python_client/customize/requirements.txt b/tests/python_client/customize/requirements.txt new file mode 100644 index 0000000000..e11eba7392 --- /dev/null +++ b/tests/python_client/customize/requirements.txt @@ -0,0 +1 @@ +python-benedict==0.24.3 \ No newline at end of file diff --git a/tests/python_client/customize/template/default.yaml b/tests/python_client/customize/template/default.yaml new file mode 100644 index 0000000000..8f382d35ba --- /dev/null +++ b/tests/python_client/customize/template/default.yaml @@ -0,0 +1,10 @@ +apiVersion: milvus.io/v1alpha1 +kind: MilvusCluster +metadata: + name: my-release + labels: + app: milvus +spec: + config: {} + components: {} + dependencies: {} diff --git a/tests/python_client/customize/test_simd_compat.py b/tests/python_client/customize/test_simd_compat.py new file mode 100644 index 0000000000..440b8d518a --- /dev/null +++ b/tests/python_client/customize/test_simd_compat.py @@ -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 + + + +