From 50b11d98d1cfb33dc7a0e9308bcd012f10d06d60 Mon Sep 17 00:00:00 2001 From: cliang li Date: Tue, 22 Aug 2023 03:03:08 -0700 Subject: [PATCH] rebase to the latest master branch, and move test configures to pytest_config.json --- dss_datamover/unittests/conftest.py | 3 +- dss_datamover/unittests/pytest_config.json | 65 +++++++++++++++++++++- 2 files changed, 63 insertions(+), 5 deletions(-) diff --git a/dss_datamover/unittests/conftest.py b/dss_datamover/unittests/conftest.py index 4b5ed48..5039e61 100755 --- a/dss_datamover/unittests/conftest.py +++ b/dss_datamover/unittests/conftest.py @@ -68,8 +68,7 @@ def get_pytest_configs(): @pytest.fixture(scope="session") def get_config_object(): - # test_config_filepath = os.path.dirname(__file__) + "/pytest_config.json" - test_config_filepath = "/etc/dss/datamover/standard_config.json" + test_config_filepath = os.path.dirname(__file__) + "/pytest_config.json" config_obj = config.Config({}, config_filepath=test_config_filepath) return config_obj diff --git a/dss_datamover/unittests/pytest_config.json b/dss_datamover/unittests/pytest_config.json index 4cd5305..5b471df 100755 --- a/dss_datamover/unittests/pytest_config.json +++ b/dss_datamover/unittests/pytest_config.json @@ -1,7 +1,66 @@ { - "config": "/etc/dss/datamover/config.json", + "config": "/etc/dss/datamover/standard_config.json", "dest_path": "/tmp/xyz", "cache": ["/var/log/dss/prefix_index_data.json", "/var/log/dss/dm_resume_prefix_dir_keys.txt"], - "fs_config": {"server_as_prefix": "yes"}, - "default_ip": "1.2.3.4" + "default_ip": "1.2.3.4", + "clients_hosts_or_ip_addresses": ["1.2.3.4", "5.6.7.8"], + "master": { + "host_or_ip_address": "1.2.3.4", + "workers": 1, + "max_index_size": 1000, + "size": "1GB" + }, + "client": { + "workers": 25, + "max_index_size": 1000, + "user_id": "ansible", + "password": "ansible" + }, + "message": { + "port_index": 6000, + "port_status": 6001 + }, + "socket_options": { + "connection_retry_delay": 2, + "max_connection_time_threshold": 300, + "response_header_length": 10, + "recv_timeout": 60 + }, + "fs_config": { + "mounted": false, + "nfs": { + "202.0.0.103": ["/dir1", "/dir2"] + }, + "nfsport": 2049, + "server_as_prefix": "yes" + }, + "s3_storage": { + "minio": {"url": "1.2.3.4:9000", "access_key": "minio", "secret_key": "minio123"}, + "bucket": "bucket", + "client_lib": "dss_client" + }, + "operations": ["PUT", "GET", "DEL", "LIST"], + "logging": { + "path": "/var/log/dss", + "level": "INFO", + "max_log_file_size": 1048576, + "log_file_backup_count": 5 + }, + "dss_targets": { + "subsystem_nqn": { + "1": ["vm1"], + "2": ["vm2"], + "3": ["vm3"], + "4": ["vm4"] + }, + "installation_path": "/usr/dss/nkv-target" + }, + "environment": { + "gcc": { + "version": "5.1", + "source": "/usr/local/bin/setenv-for-gcc510.sh", + "required": true + } + }, + "compaction": "yes" }