#!/bin/bash
set -mex
cd $(dirname $0)

../weborf -b site1 -p 12346  --cert cert/certificate.pem --key cert/key.pem &
WEBORF_PID=$(jobs -p)

function cleanup () {
    kill -9 $WEBORF_PID
}
trap cleanup EXIT

ROBOTS=$(curl -s -k https://127.0.0.1:12346/robots.txt)

[[ "$ROBOTS" = $(cat site1/robots.txt) ]]
