forked from mtusi2026/mtusi2026lab3
109 lines
4.5 KiB
Plaintext
109 lines
4.5 KiB
Plaintext
$ make test-expiry
|
|
docker compose --profile expiry up -d --build --wait api-short-ttl
|
|
#1 [internal] load local bake definitions
|
|
#1 reading from stdin 1.20kB done
|
|
#1 DONE 0.0s
|
|
|
|
#2 [api-short-ttl internal] load build definition from Dockerfile
|
|
#2 transferring dockerfile: 914B done
|
|
#2 DONE 0.0s
|
|
|
|
#3 [api-short-ttl internal] load metadata for docker.io/library/python:3.12.12-slim-bookworm
|
|
#3 DONE 0.1s
|
|
|
|
#4 [api-short-ttl internal] load .dockerignore
|
|
#4 transferring context: 358B done
|
|
#4 DONE 0.0s
|
|
|
|
#5 [api-short-ttl 1/7] FROM docker.io/library/python:3.12.12-slim-bookworm@sha256:593bd06efe90efa80dc4eee3948be7c0fde4134606dd40d8dd8dbcade98e669c
|
|
#5 resolve docker.io/library/python:3.12.12-slim-bookworm@sha256:593bd06efe90efa80dc4eee3948be7c0fde4134606dd40d8dd8dbcade98e669c done
|
|
#5 DONE 0.0s
|
|
|
|
#6 [api-short-ttl internal] load build context
|
|
#6 transferring context: 7.39kB done
|
|
#6 DONE 0.0s
|
|
|
|
#7 [migrate 5/7] COPY migrations ./migrations
|
|
#7 CACHED
|
|
|
|
#8 [migrate 4/7] RUN pip install --no-cache-dir --timeout 60 --retries 10 "poetry==2.2.1" && poetry install --only main --no-root --no-interaction
|
|
#8 CACHED
|
|
|
|
#9 [migrate 2/7] WORKDIR /app
|
|
#9 CACHED
|
|
|
|
#10 [migrate 6/7] COPY src ./src
|
|
#10 CACHED
|
|
|
|
#11 [migrate 3/7] COPY poetry.lock pyproject.toml ./
|
|
#11 CACHED
|
|
|
|
#12 [api-short-ttl 7/7] RUN useradd --system --uid 10001 --no-create-home app
|
|
#12 CACHED
|
|
|
|
#13 [migrate] exporting to image
|
|
#13 exporting layers done
|
|
#13 exporting manifest sha256:9802819ef7b235f44ad03fed838cf83fcd4573a342405936538c7c969adfd573 done
|
|
#13 exporting config sha256:e2b0c133c10bc42d53160db701c32694ed2cbac54f0522999289f4cf7cef21e1 done
|
|
#13 naming to docker.io/library/mtusi-messenger:lab3 done
|
|
#13 unpacking to docker.io/library/mtusi-messenger:lab3 done
|
|
#13 DONE 0.0s
|
|
|
|
#14 [api-short-ttl] exporting to image
|
|
#14 exporting layers done
|
|
#14 exporting manifest sha256:036b7dde37a28a3eeec751ce6ada2034e1a9a1d76cd9310dbd3cd157824ea087 done
|
|
#14 exporting config sha256:26fb210928fa7201fedcce1e64d506079d863ddc42532dc4d25f1f77d673e3b3 done
|
|
#14 naming to docker.io/library/mtusi-messenger:lab3 done
|
|
#14 unpacking to docker.io/library/mtusi-messenger:lab3 done
|
|
#14 DONE 0.0s
|
|
|
|
#15 [migrate] resolving provenance for metadata file
|
|
#15 DONE 0.0s
|
|
|
|
#16 [api-short-ttl] resolving provenance for metadata file
|
|
#16 DONE 0.0s
|
|
mtusi-messenger:lab3 Built
|
|
mtusi-messenger:lab3 Built
|
|
Container messenger-lab3-valkey-1 Running
|
|
Container messenger-lab3-postgres-1 Running
|
|
Container messenger-lab3-migrate-1 Recreate
|
|
Container messenger-lab3-migrate-1 Recreated
|
|
Container messenger-lab3-api-short-ttl-1 Creating
|
|
Container messenger-lab3-api-short-ttl-1 Created
|
|
Container messenger-lab3-postgres-1 Waiting
|
|
Container messenger-lab3-postgres-1 Healthy
|
|
Container messenger-lab3-migrate-1 Starting
|
|
Container messenger-lab3-migrate-1 Started
|
|
Container messenger-lab3-migrate-1 Waiting
|
|
Container messenger-lab3-postgres-1 Waiting
|
|
Container messenger-lab3-postgres-1 Healthy
|
|
Container messenger-lab3-migrate-1 Exited
|
|
Container messenger-lab3-api-short-ttl-1 Starting
|
|
Container messenger-lab3-api-short-ttl-1 Started
|
|
Container messenger-lab3-api-short-ttl-1 Waiting
|
|
Container messenger-lab3-migrate-1 Waiting
|
|
Container messenger-lab3-postgres-1 Waiting
|
|
Container messenger-lab3-valkey-1 Waiting
|
|
Container messenger-lab3-migrate-1 Exited
|
|
Container messenger-lab3-valkey-1 Healthy
|
|
Container messenger-lab3-postgres-1 Healthy
|
|
Container messenger-lab3-api-short-ttl-1 Healthy
|
|
EXPIRY_BASE_URL=http://localhost:8081 poetry run pytest student-tests/test_expiry.py -s; \
|
|
status=$?; docker compose --profile expiry stop api-short-ttl; exit $status
|
|
/Users/enterxx/Library/Python/3.9/lib/python/site-packages/urllib3/__init__.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
|
|
warnings.warn(
|
|
============================= test session starts ==============================
|
|
platform darwin -- Python 3.12.12, pytest-9.1.1, pluggy-1.6.0 -- /Users/enterxx/Library/Caches/pypoetry/virtualenvs/max2-jSniokBX-py3.12/bin/python
|
|
cachedir: .pytest_cache
|
|
rootdir: /Users/enterxx/Desktop/university/4course/mtusi2026lab3
|
|
configfile: pyproject.toml
|
|
plugins: anyio-4.15.1
|
|
collecting ... collected 2 items
|
|
|
|
student-tests/test_expiry.py::test_session_expires_after_short_ttl PASSED
|
|
student-tests/test_expiry.py::test_expires_at_matches_short_ttl PASSED
|
|
|
|
============================== 2 passed in 3.54s ===============================
|
|
Container messenger-lab3-api-short-ttl-1 Stopping
|
|
Container messenger-lab3-api-short-ttl-1 Stopped
|