<commit_before>#!/bin/bash

# Attempted to setup environment variables but was unsuccesful passing them to curl
#USER="admin<EMAIL>:adminAb1"
#HOST="http://localhost:8080/"
#PATH="service/dig"
DAO="regionDAO"
#URL="$HOST$PATH?dao=$DAO&q=$QUERY"
PASS=0
FAIL=1
STATUS_CODE=
QUERY=
#                      --silent \
function send_quiet {
    STATUS_CODE=$(/usr/bin/curl --write-out %{http_code} \
                                --silent \
                                --output out.html \
                                -X GET \
                                -u '<EMAIL>:adminAb1' \
                                'http://localhost:8080/service/dig?dao='$DAO'&q='$QUERY \
                                -H 'accept: application/json' \
                                -H 'cache-control: no-cache' \
                                -H 'content-type: application/json')
}

function send_verbose {
    /usr/bin/curl --write-out %{http_code} \
                  --silent \
                  -X GET \
                  -u '<EMAIL>:adminAb1' \
                  'http://localhost:8080/service/dig?dao='$DAO'&q='$QUERY \
                  -H 'accept: application/json' \
                  -H 'cache-control: no-cache' \
                  -H 'content-type: application/json'
}

function test () {
    EXPECTATION=$1
    QUERY=$2
<commit_msg>added port and credentials script variables<commit_after>#!/bin/bash

# Attempted to setup environment variables but was unsuccesful passing them to curl
#USER="admin<EMAIL>:adminAb1"
#PATH="service/dig"
DAO="regionDAO"
#URL="$HOST$PATH?dao=$DAO&q=$QUERY"
PASS=0
FAIL=1
STATUS_CODE=
QUERY=
PORT=8080
CREDENTIALS='admin<EMAIL>:<PASSWORD>Ab1'
#                      --silent \
function send_quiet {
    STATUS_CODE=$(/usr/bin/curl --write-out %{http_code} \
                                --silent \
                                --output out.html \
                                -X GET \
                                -u '<EMAIL>:adminAb1' \
                                'http://localhost:8080/service/dig?dao='$DAO'&q='$QUERY \
                                -H 'accept: application/json' \
                                -H 'cache-control: no-cache' \
                                -H 'content-type: application/json')
}

function send_verbose {
    /usr/bin/curl --write-out %{http_code} \
                  --silent \
                  -X GET \
                  -u '<EMAIL>:adminAb1' \
                  'http://localhost:8080/service/dig?dao='$DAO'&q='$QUERY \
                  -H 'accept: application/json' \
                  -H 'cache-control: no-cache' \
                  -H 'content-type: application/json'
}

function test () {
    EXPECTATION=$1
    QUERY=$2

{'fraction_non_alphanumeric': 0.13729809104258445, 'fraction_numerical': 0.014317180616740088, 'mean_word_length': 1.3171768707482994, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1321608', 'n_tokens_mistral': 860, 'n_tokens_neox': 795, 'n_words': 144}