Reputation: 167
I'm trying to run integration test with redis in docker. I have .yml file setup as follows but when I run docker compose up it doesnt show the test results or doesnt run the dockerfile at all, but it responds with success and shows the redis and test container are created. The redis container stays up but the test exits quickly. What do I have to change to view the test results or even to check if its running the tests?
version: '3.4'
services:
redis-service:
image: redis
container_name: redis
restart: on-failure
ports:
- "6379:6379"
test-service:
image: ${DOCKER_REGISTRY-}redistest
depends_on:
- redis-service
build:
context: .
dockerfile: tests/RedisTest/Dockerfile
And here is the docker file
FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS build
WORKDIR /src
COPY ["tests/RedisTest/RedisTest.csproj", "tests/RedisTest/"]
RUN dotnet restore "tests/RedisTest/RedisTest.csproj"
COPY . .
RUN dotnet test "/src/tests/RedisTest/RedisTest.csproj" -c Release --logger "trx;LogFileName=test_results.trx"
Upvotes: 0
Views: 865
Reputation: 167
I finally found the problem
Upvotes: 1