<commit_before>#!/bin/bash

# elasticsearch integration test for Socorro

if [ -z "$ES_HOST" ]
then
  ES_HOST="localhost"
fi

echo -n "INFO: setting up environment..."
. socorro-virtualenv/bin/activate >> setup.log 2>&1
if [ $? != 0 ]
then
  fatal 1 "could not activate virtualenv"
fi
export PYTHONPATH=.
echo " Done."

echo -n "INFO: running elasticsearch integration"
python socorro/integrationtest/test_elasticsearch_storage_app.py --elasticsearch_urls="http://${ES_HOST}:9200" --elasticsearch_index=socorro_integration_test --elasticsearch_emails_index=socorro_integration_test<commit_msg>Replace ES_HOST envvar with elasticsearch_urls<commit_after>#!/bin/bash

# elasticsearch integration test for Socorro

elasticsearch_urls=${elasticsearch_urls:-"http://localhost:9200"}

echo -n "INFO: setting up environment..."
. socorro-virtualenv/bin/activate >> setup.log 2>&1
if [ $? != 0 ]
then
  fatal 1 "could not activate virtualenv"
fi
export PYTHONPATH=.
echo " Done."

echo -n "INFO: running elasticsearch integration"
python socorro/integrationtest/test_elasticsearch_storage_app.py --elasticsearch_urls=$elasticsearch_urls --elasticsearch_index=socorro_integration_test --elasticsearch_emails_index=socorro_integration_test
{'fraction_non_alphanumeric': 0.1114727420667209, 'fraction_numerical': 0.013018714401952807, 'mean_word_length': 6.068965517241379, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, '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': '6634419', 'n_tokens_mistral': 398, 'n_tokens_neox': 378, 'n_words': 90}