Skip to content

Commit

Permalink
Replace get_system_config with get_pytest_configs
Browse files Browse the repository at this point in the history
  • Loading branch information
cliang li committed Sep 2, 2023
1 parent bc8428b commit 648a587
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 19 deletions.
31 changes: 13 additions & 18 deletions dss_datamover/unittests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,6 @@ def get_config_dict(get_config_object):
return get_config_object.get_config()


@pytest.fixture(scope="session")
def get_system_config_dict(get_system_config_object):
return get_system_config_object.get_config()


@pytest.fixture
def get_multiprocessing_logger(tmpdir):
logger_status = Value('i', 0) # 0=NOT-STARTED, 1=RUNNING, 2=STOPPED
Expand Down Expand Up @@ -267,12 +262,12 @@ def get_mock_serversocket(mocker):


@pytest.fixture
def get_master_dryrun(get_system_config_dict, get_pytest_configs):
def get_master_dryrun(get_config_dict, get_pytest_configs):
def instantiate_master_object(operation):
get_system_config_dict["config"] = get_pytest_configs["config"]
get_system_config_dict["dest_path"] = get_pytest_configs["dest_path"]
get_system_config_dict["dryrun"] = True
master = Master(operation, get_system_config_dict)
get_config_dict["config"] = get_pytest_configs["config"]
get_config_dict["dest_path"] = get_pytest_configs["dest_path"]
get_config_dict["dryrun"] = True
master = Master(operation, get_config_dict)
print("instantiated master obj")
master.start()
print("successfully started master obj")
Expand All @@ -281,11 +276,11 @@ def instantiate_master_object(operation):


@pytest.fixture
def get_master(get_system_config_dict, get_pytest_configs):
def get_master(get_config_dict, get_pytest_configs):
def instantiate_master_object(operation):
get_system_config_dict["config"] = get_pytest_configs["config"]
get_system_config_dict["dest_path"] = get_pytest_configs["dest_path"]
master = Master(operation, get_system_config_dict)
get_config_dict["config"] = get_pytest_configs["config"]
get_config_dict["dest_path"] = get_pytest_configs["dest_path"]
master = Master(operation, get_config_dict)
print("instantiated master obj")
master.start()
print("successfully started master obj")
Expand All @@ -294,10 +289,10 @@ def instantiate_master_object(operation):


@pytest.fixture
def get_master_for_indexing(get_system_config_dict, get_pytest_configs):
get_system_config_dict["config"] = get_pytest_configs["config"]
get_system_config_dict["dest_path"] = get_pytest_configs["dest_path"]
master = Master("PUT", get_system_config_dict)
def get_master_for_indexing(get_config_dict, get_pytest_configs):
get_config_dict["config"] = get_pytest_configs["config"]
get_config_dict["dest_path"] = get_pytest_configs["dest_path"]
master = Master("PUT", get_config_dict)
return master


Expand Down
3 changes: 2 additions & 1 deletion dss_datamover/unittests/pytest_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,6 @@
"required": true
}
},
"compaction": "yes"
"compaction": "yes",
"ip_address_family": "IPV4"
}

0 comments on commit 648a587

Please sign in to comment.