salt-ext-modules-vmware
salt-ext-modules-vmware copied to clipboard
use pytest fixture for test datastore lookup instead of integration_test_config
tests/integration/modules/test_datastore.py
and
tests/integration/states/test_datastore.py
both use integration_test_config["datastores"]
.
We should modify those tests to get a datastore name (cached using a pytest fixture?), then modify it/restore its state; something like:
@pytest.fixture(scope="session")
def datastore(service_instance, integration_test_config):
host = integration_test_config["esxi_host_name"]
datastores = datastore.get(
service_instance=service_instance,
host_name=host,
)
return datastores[0]