object_based_docstore_approach #68
@@ -8,6 +8,7 @@ from pathlib import Path
|
||||
|
||||
import minio
|
||||
import pytest
|
||||
from dotenv import load_dotenv
|
||||
from PIL import Image
|
||||
from pymongo import MongoClient
|
||||
|
||||
@@ -30,24 +31,15 @@ from shared.repositories.src.implementations import (
|
||||
# set random seed for reproducibility
|
||||
random.seed(13)
|
||||
|
||||
# define test static variables
|
||||
MINIO_PORT = 9000
|
||||
MINIO_ACCESS_KEY = 'minioadmin'
|
||||
MINIO_SECRET_KEY = 'minioadmin'
|
||||
MONGO_PORT = 27017
|
||||
MONGO_USERNAME = 'admin'
|
||||
MONGO_PASSWORD = 'password'
|
||||
# load loca test environment variables
|
||||
test_env_path = Path(__file__).parent.parent.parent.parent.parent / 'test.env'
|
||||
load_dotenv('test.env')
|
||||
|
||||
# define test environment variables
|
||||
env_var_map = {
|
||||
'MINIO_ENDPOINT': f'localhost:{MINIO_PORT}', # updated when container is running
|
||||
'MINIO_ACCESS_KEY': MINIO_ACCESS_KEY,
|
||||
'MINIO_SECRET_KEY': MINIO_SECRET_KEY,
|
||||
'MINIO_BUCKET_NAME': 'test-bucket',
|
||||
'MINIO_OBJECT_NAME': 'test-object',
|
||||
'MINIO_IMAGE_NAME': 'test-image',
|
||||
'MONGO_ENDPOINT': (
|
||||
f'mongodb://{MONGO_USERNAME}:{MONGO_PASSWORD}@localhost:{MONGO_PORT}/'
|
||||
), # updated when container is running
|
||||
'MONGO_DB': 'test-db',
|
||||
'MONGO_COLLECTION': 'test-collection',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user