factored out test section of config
This commit is contained in:
parent
dca206cda5
commit
b0bd9aebdf
19
config.yaml
19
config.yaml
@ -38,22 +38,3 @@ probing_webserver:
|
|||||||
host: $PROBING_WEBSERVER_HOST|"0.0.0.0" # Probe webserver address
|
host: $PROBING_WEBSERVER_HOST|"0.0.0.0" # Probe webserver address
|
||||||
port: $PROBING_WEBSERVER_PORT|8080 # Probe webserver port
|
port: $PROBING_WEBSERVER_PORT|8080 # Probe webserver port
|
||||||
mode: $PROBING_WEBSERVER_MODE|production # webserver mode: {development, production}
|
mode: $PROBING_WEBSERVER_MODE|production # webserver mode: {development, production}
|
||||||
|
|
||||||
test:
|
|
||||||
minio:
|
|
||||||
s3:
|
|
||||||
endpoint: "http://127.0.0.1:9000"
|
|
||||||
access_key: root
|
|
||||||
secret_key: password
|
|
||||||
|
|
||||||
aws:
|
|
||||||
s3:
|
|
||||||
endpoint: https://s3.amazonaws.com
|
|
||||||
access_key: AKIA4QVP6D4LCDAGYGN2
|
|
||||||
secret_key: 8N6H1TUHTsbvW2qMAm7zZlJ63hMqjcXAsdN7TYED
|
|
||||||
|
|
||||||
azure:
|
|
||||||
azure_blob_storage:
|
|
||||||
connection_string: "DefaultEndpointsProtocol=https;AccountName=iqserdevelopment;AccountKey=4imAbV9PYXaztSOMpIyAClg88bAZCXuXMGJG0GA1eIBpdh2PlnFGoRBnKqLy2YZUSTmZ3wJfC7tzfHtuC6FEhQ==;EndpointSuffix=core.windows.net"
|
|
||||||
|
|
||||||
bucket: "pyinfra-test-bucket"
|
|
||||||
|
|||||||
@ -4,11 +4,11 @@ from pathlib import Path
|
|||||||
|
|
||||||
|
|
||||||
MODULE_DIR = Path(__file__).resolve().parents[0]
|
MODULE_DIR = Path(__file__).resolve().parents[0]
|
||||||
|
|
||||||
PACKAGE_ROOT_DIR = MODULE_DIR.parents[0]
|
PACKAGE_ROOT_DIR = MODULE_DIR.parents[0]
|
||||||
|
|
||||||
DOCKER_COMPOSE_FILE = PACKAGE_ROOT_DIR.joinpath("docker-compose.yaml")
|
TEST_DIR = MODULE_DIR / "test"
|
||||||
|
|
||||||
CONFIG_FILE = PACKAGE_ROOT_DIR.joinpath("config.yaml")
|
CONFIG_FILE = PACKAGE_ROOT_DIR / "config.yaml"
|
||||||
LOG_FILE = Path("/tmp/log.log")
|
|
||||||
|
|
||||||
DATA_DIR = PACKAGE_ROOT_DIR.joinpath("data")
|
TEST_CONFIG_FILE = TEST_DIR / "config.yaml"
|
||||||
|
|||||||
5
pyinfra/test/config.py
Normal file
5
pyinfra/test/config.py
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
from pyinfra.config import Config
|
||||||
|
from pyinfra.locations import TEST_CONFIG_FILE
|
||||||
|
|
||||||
|
|
||||||
|
CONFIG = Config(TEST_CONFIG_FILE)
|
||||||
18
pyinfra/test/config.yaml
Normal file
18
pyinfra/test/config.yaml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
test:
|
||||||
|
minio:
|
||||||
|
s3:
|
||||||
|
endpoint: "http://127.0.0.1:9000"
|
||||||
|
access_key: root
|
||||||
|
secret_key: password
|
||||||
|
|
||||||
|
aws:
|
||||||
|
s3:
|
||||||
|
endpoint: https://s3.amazonaws.com
|
||||||
|
access_key: AKIA4QVP6D4LCDAGYGN2
|
||||||
|
secret_key: 8N6H1TUHTsbvW2qMAm7zZlJ63hMqjcXAsdN7TYED
|
||||||
|
|
||||||
|
azure:
|
||||||
|
azure_blob_storage:
|
||||||
|
connection_string: "DefaultEndpointsProtocol=https;AccountName=iqserdevelopment;AccountKey=4imAbV9PYXaztSOMpIyAClg88bAZCXuXMGJG0GA1eIBpdh2PlnFGoRBnKqLy2YZUSTmZ3wJfC7tzfHtuC6FEhQ==;EndpointSuffix=core.windows.net"
|
||||||
|
|
||||||
|
bucket: "pyinfra-test-bucket"
|
||||||
@ -2,7 +2,7 @@ import logging
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from pyinfra.config import CONFIG
|
from pyinfra.test.config import CONFIG
|
||||||
from pyinfra.exceptions import UnknownClient
|
from pyinfra.exceptions import UnknownClient
|
||||||
from pyinfra.storage.adapters.azure import AzureStorageAdapter
|
from pyinfra.storage.adapters.azure import AzureStorageAdapter
|
||||||
from pyinfra.storage.adapters.s3 import S3StorageAdapter
|
from pyinfra.storage.adapters.s3 import S3StorageAdapter
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user