From f888d60b1f702d98bf172027ec97c835cbb8336f Mon Sep 17 00:00:00 2001 From: Joshkovu Date: Wed, 6 May 2026 16:09:30 +0300 Subject: [PATCH] chore: remove run_tests_with_container.sh script --- run_tests_with_container.sh | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100755 run_tests_with_container.sh diff --git a/run_tests_with_container.sh b/run_tests_with_container.sh deleted file mode 100755 index 2ca744db..00000000 --- a/run_tests_with_container.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -# Start a Postgres test container, export env vars, run pytest, then clean up. - -set -e - -# Find a free port -FREE_PORT=$(comm -23 <(seq 20000 25000 | sort) <(ss -Htan | awk '{print $4}' | grep -oE '[0-9]+$' | sort -u) | shuf | head -n 1) - -# Start the container and capture env vars -CONTAINER_ID=$(docker run -d -e POSTGRES_DB=test -e POSTGRES_USER=test -e POSTGRES_PASSWORD=test -p $FREE_PORT:5432 postgres:15.3) - -# Wait for Postgres to be ready -until docker exec $CONTAINER_ID pg_isready -U test > /dev/null 2>&1; do - sleep 1 -done - -export POSTGRES_DB=test -export POSTGRES_USER=test -export POSTGRES_PASSWORD=test -export POSTGRES_HOST=localhost -export POSTGRES_PORT=$FREE_PORT -export POSTGRES_SSLMODE=disable -export DJANGO_SETTINGS_MODULE=config.settings - -pytest logify-backend - -# Stop and remove the container -docker stop $CONTAINER_ID > /dev/null -docker rm $CONTAINER_ID > /dev/null