#!/usr/bin/env bash
# Check that the Cobbler HTTP endpoint /autoinstall/ is callable

source ${SYSTESTS_PRELUDE} && prepare

set -x -e -o pipefail

# Arrange
cobbler distro add --name fake --arch x86_64 --kernel ${fake_kernel} \
	--initrd ${fake_initramfs}
cobbler profile add --name fake --distro fake
cobbler system add --name testbed --profile fake
# TODO user
#cobbler user add --name testuser
# Prepare expected result
cat >${tmp}/a <<-EOF
[] EOF

# Act
curl --output ${tmp}/b http://localhost/cblr/svc/op/events
#curl --output ${tmp}/c http://localhost/cblr/svc/op/events/user/testuser

# Assert
diff ${tmp}/{a,b}