diff --git a/Dockerfile b/Dockerfile index 1650c3c..7e3b856 100644 --- a/Dockerfile +++ b/Dockerfile @@ -55,6 +55,4 @@ RUN poetry install COPY fix_nodriver.py ./ RUN . /app/.venv/bin/activate && python fix_nodriver.py COPY . . -RUN chmod +x entrypoint.sh -RUN ./pytest.sh CMD ["./entrypoint.sh", "&&", ".", "/app/.venv/bin/activate", "&&", "python", "main.py"] \ No newline at end of file diff --git a/README.md b/README.md index b2366b4..820c497 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@ An alternative to [FlareSolverr](https://github.com/FlareSolverr/FlareSolverr) a > [!IMPORTANT] > Currenly, due to [bug in nodriver](https://github.com/ultrafunkamsterdam/undetected-chromedriver/issues/1954), if you want to run this project ouside of prebuild container, you have to run `python fix_nodriver.py` after creating venv to patch the library. - > [!NOTE] > Thanks to FastAPI implementation, now you can also see the API documentation at `/docs` or `/` (redirect to `/docs`) endpoints. diff --git a/pytest.sh b/pytest.sh index 318e85d..1c51418 100755 --- a/pytest.sh +++ b/pytest.sh @@ -1,3 +1,3 @@ -if [ "$(uname -m)" == "x86_64" ]; then - ./entrypoint.sh &&. /app/.venv/bin/activate && poetry run pytest +if [ $(arch) = "x86_64" ]; then + ./entrypoint.sh && . ./.venv/bin/activate && poetry run pytest fi \ No newline at end of file diff --git a/tests/main_test.py b/tests/main_test.py index 8b9898d..f656fc2 100644 --- a/tests/main_test.py +++ b/tests/main_test.py @@ -1,4 +1,5 @@ from http import HTTPStatus +from time import sleep import pytest from starlette.testclient import TestClient @@ -19,6 +20,7 @@ test_websites = [ @pytest.mark.parametrize("website", test_websites) def test_bypass(website: str): + sleep(3) response = client.post( "/v1", json=LinkRequest(url=website, maxTimeout=30, cmd="request.get").model_dump(),