Add customize config tests (#9965)

Signed-off-by: yanliang567 <yanliang.qiao@zilliz.com>
This commit is contained in:
yanliang567 2021-10-15 17:48:42 +08:00 committed by GitHub
parent dbc7ae4f55
commit 39a5e98651
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 74 additions and 0 deletions

View File

@ -0,0 +1,3 @@
Verify user is able to easily customize Milvus deployment with various configuration items.
To be updated...

View 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)

View File

@ -0,0 +1 @@
python-benedict==0.24.3

View File

@ -0,0 +1,10 @@
apiVersion: milvus.io/v1alpha1
kind: MilvusCluster
metadata:
name: my-release
labels:
app: milvus
spec:
config: {}
components: {}
dependencies: {}

View 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