#!/bin/bash

# Wait for the application to start
sleep 10

# Check if the service is running
response=$(curl -s http://localhost:3000/health)
expected='"status":"healthy"'

if [[ "$response" == *"$expected"* ]]; then
    echo "Service validation successful"
    exit 0
else
    echo "Service validation failed"
    echo "Response: $response"
    exit 1
fi
