<commit_before>#!/bin/bash
set -ex

HOSTNAME=$1

response=`curl https://$HOSTNAME/`

# Test that the response contains something that looks like an IP.
if [[ $response =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
    exit 0
else
    echo "Received:" $response
    exit 1
fi<commit_msg>Smoke test the content type<commit_after>#!/bin/bash
set -ex

HOSTNAME=$1

response=$(curl --verbose https://$HOSTNAME/ 2> /tmp/smoke-stderr)
response_stderr=$(</tmp/smoke-stderr)
rm /tmp/smoke-stderr

# Test that the response contains something that looks like an IP.
if [[ ! $response =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
    echo "Unexpected response body:" $response
    exit 1
fi

echo $response_stderr | grep "text/plain"
{'fraction_non_alphanumeric': 0.20212765957446807, 'fraction_numerical': 0.05053191489361702, 'mean_word_length': 3.858064516129032, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4570170', 'n_tokens_mistral': 296, 'n_tokens_neox': 283, 'n_words': 72}