# Logs timestamps when log.timestamp is set to true

exec bash -x ./test.sh &
exec karma --log.timestamp=true --pid-file=karma.pid --listen.address=127.0.0.1 --listen.port=8062
! stdout .
stderr 'time=[0-9]+-[0-9]+-[0-9]+T[0-9]+:[0-9]+:[0-9]+.* level=INFO msg="Version: dev"'
stderr 'time=[0-9]+-[0-9]+-[0-9]+T[0-9]+:[0-9]+:[0-9]+.* level=INFO msg="Pulling latest alerts and silences from Alertmanager"'
wait

-- test.sh --
while [ ! -f karma.pid ]; do sleep 1 ; done
sleep 5
cat karma.pid | xargs kill
