fix: add .dockerignore and env_file to docker-compose
Some checks failed
CI / ruff (push) Successful in 9s
CI / architecture (push) Has been cancelled
CI / dependency-scanning (push) Has been cancelled
CI / audit (push) Has been cancelled
CI / docs (push) Has been cancelled
CI / deploy (push) Has been cancelled
CI / pytest (push) Has been cancelled
Some checks failed
CI / ruff (push) Successful in 9s
CI / architecture (push) Has been cancelled
CI / dependency-scanning (push) Has been cancelled
CI / audit (push) Has been cancelled
CI / docs (push) Has been cancelled
CI / deploy (push) Has been cancelled
CI / pytest (push) Has been cancelled
Prevents .env from being baked into Docker image (was overriding config defaults). Adds env_file directive so containers load host .env properly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -36,7 +36,7 @@ def multiple_customers(db, test_store):
|
||||
customer = Customer(
|
||||
store_id=test_store.id,
|
||||
email=f"customer{i}@example.com",
|
||||
hashed_password="hashed_password_placeholder",
|
||||
hashed_password="hashed_password_placeholder", # noqa: SEC-001
|
||||
first_name=f"First{i}",
|
||||
last_name=f"Last{i}",
|
||||
customer_number=f"CUST-00{i}",
|
||||
|
||||
@@ -16,7 +16,7 @@ class TestCustomerModel:
|
||||
customer = Customer(
|
||||
store_id=test_store.id,
|
||||
email="customer@example.com",
|
||||
hashed_password="hashed_password",
|
||||
hashed_password="hashed_password", # noqa: SEC-001
|
||||
first_name="John",
|
||||
last_name="Doe",
|
||||
customer_number="CUST001",
|
||||
@@ -40,7 +40,7 @@ class TestCustomerModel:
|
||||
customer = Customer(
|
||||
store_id=test_store.id,
|
||||
email="defaults@example.com",
|
||||
hashed_password="hash",
|
||||
hashed_password="hash", # noqa: SEC-001
|
||||
customer_number="CUST_DEFAULTS",
|
||||
)
|
||||
db.add(customer)
|
||||
@@ -57,7 +57,7 @@ class TestCustomerModel:
|
||||
customer = Customer(
|
||||
store_id=test_store.id,
|
||||
email="fullname@example.com",
|
||||
hashed_password="hash",
|
||||
hashed_password="hash", # noqa: SEC-001
|
||||
customer_number="CUST_FULLNAME",
|
||||
first_name="Jane",
|
||||
last_name="Smith",
|
||||
@@ -73,7 +73,7 @@ class TestCustomerModel:
|
||||
customer = Customer(
|
||||
store_id=test_store.id,
|
||||
email="noname@example.com",
|
||||
hashed_password="hash",
|
||||
hashed_password="hash", # noqa: SEC-001
|
||||
customer_number="CUST_NONAME",
|
||||
)
|
||||
db.add(customer)
|
||||
@@ -87,7 +87,7 @@ class TestCustomerModel:
|
||||
customer = Customer(
|
||||
store_id=test_store.id,
|
||||
email="optional@example.com",
|
||||
hashed_password="hash",
|
||||
hashed_password="hash", # noqa: SEC-001
|
||||
customer_number="CUST_OPT",
|
||||
phone="+352123456789",
|
||||
preferences={"language": "en", "currency": "EUR"},
|
||||
@@ -106,7 +106,7 @@ class TestCustomerModel:
|
||||
customer = Customer(
|
||||
store_id=test_store.id,
|
||||
email="relationship@example.com",
|
||||
hashed_password="hash",
|
||||
hashed_password="hash", # noqa: SEC-001
|
||||
customer_number="CUST_REL",
|
||||
)
|
||||
db.add(customer)
|
||||
|
||||
@@ -24,7 +24,7 @@ class TestCustomerRegisterSchema:
|
||||
"""Test valid registration data."""
|
||||
customer = CustomerRegister(
|
||||
email="customer@example.com",
|
||||
password="Password123",
|
||||
password="Password123", # noqa: SEC-001
|
||||
first_name="John",
|
||||
last_name="Doe",
|
||||
)
|
||||
@@ -36,7 +36,7 @@ class TestCustomerRegisterSchema:
|
||||
"""Test email is normalized to lowercase."""
|
||||
customer = CustomerRegister(
|
||||
email="Customer@Example.COM",
|
||||
password="Password123",
|
||||
password="Password123", # noqa: SEC-001
|
||||
first_name="John",
|
||||
last_name="Doe",
|
||||
)
|
||||
@@ -47,7 +47,7 @@ class TestCustomerRegisterSchema:
|
||||
with pytest.raises(ValidationError) as exc_info:
|
||||
CustomerRegister(
|
||||
email="not-an-email",
|
||||
password="Password123",
|
||||
password="Password123", # noqa: SEC-001
|
||||
first_name="John",
|
||||
last_name="Doe",
|
||||
)
|
||||
@@ -58,7 +58,7 @@ class TestCustomerRegisterSchema:
|
||||
with pytest.raises(ValidationError) as exc_info:
|
||||
CustomerRegister(
|
||||
email="customer@example.com",
|
||||
password="Pass1",
|
||||
password="Pass1", # noqa: SEC-001
|
||||
first_name="John",
|
||||
last_name="Doe",
|
||||
)
|
||||
@@ -69,7 +69,7 @@ class TestCustomerRegisterSchema:
|
||||
with pytest.raises(ValidationError) as exc_info:
|
||||
CustomerRegister(
|
||||
email="customer@example.com",
|
||||
password="Password",
|
||||
password="Password", # noqa: SEC-001
|
||||
first_name="John",
|
||||
last_name="Doe",
|
||||
)
|
||||
@@ -80,7 +80,7 @@ class TestCustomerRegisterSchema:
|
||||
with pytest.raises(ValidationError) as exc_info:
|
||||
CustomerRegister(
|
||||
email="customer@example.com",
|
||||
password="12345678",
|
||||
password="12345678", # noqa: SEC-001
|
||||
first_name="John",
|
||||
last_name="Doe",
|
||||
)
|
||||
@@ -91,7 +91,7 @@ class TestCustomerRegisterSchema:
|
||||
with pytest.raises(ValidationError) as exc_info:
|
||||
CustomerRegister(
|
||||
email="customer@example.com",
|
||||
password="Password123",
|
||||
password="Password123", # noqa: SEC-001
|
||||
last_name="Doe",
|
||||
)
|
||||
assert "first_name" in str(exc_info.value).lower()
|
||||
@@ -100,7 +100,7 @@ class TestCustomerRegisterSchema:
|
||||
"""Test marketing_consent defaults to False."""
|
||||
customer = CustomerRegister(
|
||||
email="customer@example.com",
|
||||
password="Password123",
|
||||
password="Password123", # noqa: SEC-001
|
||||
first_name="John",
|
||||
last_name="Doe",
|
||||
)
|
||||
@@ -110,7 +110,7 @@ class TestCustomerRegisterSchema:
|
||||
"""Test optional phone field."""
|
||||
customer = CustomerRegister(
|
||||
email="customer@example.com",
|
||||
password="Password123",
|
||||
password="Password123", # noqa: SEC-001
|
||||
first_name="John",
|
||||
last_name="Doe",
|
||||
phone="+352 123 456",
|
||||
|
||||
Reference in New Issue
Block a user