-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
103 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
sync-new-env: | ||
@while IFS='=' read -r key value; do \ | ||
if [ -n "$$key" ]; then \ | ||
if ! grep -q "^$$key=" .env; then \ | ||
echo "$$key=$$value" >> .env; \ | ||
fi; \ | ||
fi; \ | ||
done < .env-copy | ||
|
||
alembic-autogenerate: | ||
@read -p "Enter migration message: " message; \ | ||
alembic revision --autogenerate -m "$$message" | ||
|
||
alembic-upgrade: | ||
alembic upgrade head | ||
|
||
init: | ||
@make sync-new-env | ||
@poetry install | ||
@docker-compose build | ||
@docker-compose up -d | ||
@sleep 5 | ||
@make alembic-upgrade | ||
@docker-compose exec minio sh -c "mc mb minio/$$(grep S3_BUCKET .env | cut -d '=' -f2)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
2023-11-28 23:44:35,708 - INFO - App started. | ||
2023-11-28 23:45:03,936 - INFO - App started. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from src.tests.utils import client | ||
|
||
|
||
def test_read_main(): | ||
response = client.get("/test") | ||
assert response.status_code == 200 | ||
response_json = response.json() | ||
assert response_json["result"] == "success" | ||
|
||
|
||
def test_index(): | ||
response = client.get("/") | ||
assert response.status_code == 200 | ||
assert b"awesome" in response.content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from fastapi.testclient import TestClient | ||
|
||
from src.main import app | ||
|
||
client = TestClient(app) |