#!/bin/bash -e

test_failed(){
    echo -e >&2 "\033[0;31mdocker-compose test failed!\033[0m"
    exit 1
}

test_passed(){
    echo -e "\033[0;32mdocker-compose test passed!\033[0m"
}

main(){
    if ! docker-compose up -d; then
        test_failed
    elif ! docker-compose ps; then
        test_failed
    elif ! nc -z -v localhost 30080; then
        test_failed
    else
        test_passed
    fi
}

main "$@"

#!/bin/bash -e

test_failed(){
    echo -e >&2 "\033[0;31mdocker-compose test failed!\033[0m"
    exit 1
}

test_passed(){
    echo -e "\033[0;32mdocker-compose test passed!\033[0m"
}

main(){
    if ! docker-compose up -d; then
        test_failed
    elif ! docker-compose ps; then
        test_failed
    elif ! sleep 1 && curl -sS localhost:30080; then
        test_failed
    else
        test_passed
    fi
}

main "$@"

Change docker-compose test to use cURL
Change docker-compose test to use cURL

tests/test-docker-compose.sh now uses cURL to match how
tests/test-kubernetes.sh checks that the service is available.

Signed-off-by: Matt Langbehn <be4a68432fbbc874fc2f26c6bc5da2cd4d88fc13@gmail.com>
