/server/setup:
    require: httpd
    test: |
        systemctl start httpd
        echo foo > /var/www/html/index.html

/server/cleanup:
    test: |
        systemctl stop httpd

/client:
    require: [curl, wget]
    test: |
        echo "Guest topology stored in '$TMT_TOPOLOGY_BASH':"
        cat "$TMT_TOPOLOGY_BASH"
        . "$TMT_TOPOLOGY_BASH"

        [[ ${TMT_GUEST[name]} == curl-client ]] && command="curl --silent"
        [[ ${TMT_GUEST[name]} == wget-client ]] && command="wget --quiet -O -"

        for count in {1..33}; do
            echo "Get file using '$command', attempt $count."
            $command http://${TMT_GUESTS[httpd-server.hostname]}/ | grep -q foo
            sleep .$[$RANDOM % 10]
        done
