pyinfra/tests/conftest.py
2022-10-13 13:17:31 +02:00

15 lines
447 B
Python

import pytest
from pyinfra.config import get_config, Config
import os
@pytest.fixture(params=["s3", "aks"])
def storage_config(request) -> Config:
if request.param == "s3":
os.environ["STORAGE_BACKEND"] = "s3"
os.environ["STORAGE_BUCKET_NAME"] = "pyinfra-test-bucket"
else:
os.environ["STORAGE_BACKEND"] = "aks"
os.environ["STORAGE_AZURECONTAINERNAME"] = "pyinfra-test-bucket"
return get_config()