forked from mtusi2026/mtusi2026lab2
90 lines
3.6 KiB
Plaintext
90 lines
3.6 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 597B done
|
|
#1 DONE 0.0s
|
|
|
|
#2 [internal] load build definition from Dockerfile
|
|
#2 transferring dockerfile: 642B done
|
|
#2 DONE 0.0s
|
|
|
|
#3 [internal] load metadata for docker.io/library/python:3.12.12-slim-bookworm
|
|
#3 DONE 0.0s
|
|
|
|
#4 [internal] load .dockerignore
|
|
#4 transferring context: 328B done
|
|
#4 DONE 0.0s
|
|
|
|
#5 [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 [internal] load build context
|
|
#6 transferring context: 117.69kB 0.0s done
|
|
#6 DONE 0.0s
|
|
|
|
#7 [3/7] COPY poetry.lock pyproject.toml ./
|
|
#7 CACHED
|
|
|
|
#8 [2/7] WORKDIR /app
|
|
#8 CACHED
|
|
|
|
#9 [5/7] COPY migrations ./migrations
|
|
#9 CACHED
|
|
|
|
#10 [4/7] RUN pip install --no-cache-dir "poetry==2.2.1" && poetry install --only main --no-root --no-interaction
|
|
#10 CACHED
|
|
|
|
#11 [6/7] COPY src ./src
|
|
#11 CACHED
|
|
|
|
#12 [7/7] RUN useradd --system --uid 10001 --no-create-home app
|
|
#12 CACHED
|
|
|
|
#13 exporting to image
|
|
#13 exporting layers done
|
|
#13 exporting manifest sha256:38c2dfc7141796ce2219a46fa351316f15c1c687a9a09ec702887d0f351165ce done
|
|
#13 exporting config sha256:1ab109ba0df31f1aa4ef7fca42802a75b11b456dfa73dcb4ec54117b4909cbc0 done
|
|
#13 exporting attestation manifest sha256:0131ba669988c7b2d51762370da624bd434ef64b4ea09b95b4a6e12458b0a1f8 done
|
|
#13 exporting manifest list sha256:95d9d58148c7c6842d3fbb4b4531522da5e203f013ddedd1e566fcd118a6c71c done
|
|
#13 naming to docker.io/library/mtusi-messenger:lab2 done
|
|
#13 unpacking to docker.io/library/mtusi-messenger:lab2 done
|
|
#13 DONE 0.0s
|
|
|
|
#14 resolving provenance for metadata file
|
|
#14 DONE 0.0s
|
|
mtusi-messenger:lab2 Built
|
|
Container messenger-lab2-valkey-1 Running
|
|
Container messenger-lab2-postgres-1 Running
|
|
Container messenger-lab2-api-short-ttl-1 Recreate
|
|
Container messenger-lab2-api-short-ttl-1 Recreated
|
|
Container messenger-lab2-postgres-1 Waiting
|
|
Container messenger-lab2-postgres-1 Healthy
|
|
Container messenger-lab2-api-short-ttl-1 Starting
|
|
Container messenger-lab2-api-short-ttl-1 Started
|
|
Container messenger-lab2-valkey-1 Waiting
|
|
Container messenger-lab2-api-short-ttl-1 Waiting
|
|
Container messenger-lab2-postgres-1 Waiting
|
|
Container messenger-lab2-valkey-1 Healthy
|
|
Container messenger-lab2-postgres-1 Healthy
|
|
Container messenger-lab2-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-TbR4RJXC-py3.12/bin/python
|
|
cachedir: .pytest_cache
|
|
rootdir: /Users/enterxx/Desktop/university/4course/mtusi2026lab2
|
|
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.26s ===============================
|
|
Container messenger-lab2-api-short-ttl-1 Stopping
|
|
Container messenger-lab2-api-short-ttl-1 Stopped
|
|
|