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

dub upgrade
dub build --build=release
dub build --build=unittest

CONNINFO=`jq '.sqlServer.connString' ${1}`
CONNINFO_UNQUOTED=`echo $CONNINFO | xargs`

# Setup Postgres test scheme
psql -v ON_ERROR_STOP=ON -f .test_pgator_rpc_table.sql "$CONNINFO_UNQUOTED"

# Test calls table by preparing statements
`./pgator --config=${1} --debug=true --check=true > /dev/null; if [ $? -ne 2 ]; then exit 1; fi` # Some statements should be bad

# Start pgator server
./pgator --config=${1} --debug=true &
trap "kill %%" EXIT

ADDRESS=`jq '.listenAddresses[0]' ${1}`
ADDRESS_UNQUOTED=`echo $ADDRESS | xargs`
PORT=`jq '.listenPort' ${1}`

# Start test client
dub run pgator:test --build=unittest -- "$ADDRESS_UNQUOTED" "$PORT"<commit_msg>dub upgrade removed from test<commit_after>#!/bin/bash
set -ve

dub build --build=release
dub build --build=unittest

CONNINFO=`jq '.sqlServer.connString' ${1}`
CONNINFO_UNQUOTED=`echo $CONNINFO | xargs`

# Setup Postgres test scheme
psql -v ON_ERROR_STOP=ON -f .test_pgator_rpc_table.sql "$CONNINFO_UNQUOTED"

# Test calls table by preparing statements
`./pgator --config=${1} --debug=true --check=true > /dev/null; if [ $? -ne 2 ]; then exit 1; fi` # Some statements should be bad

# Start pgator server
./pgator --config=${1} --debug=true &
trap "kill %%" EXIT

ADDRESS=`jq '.listenAddresses[0]' ${1}`
ADDRESS_UNQUOTED=`echo $ADDRESS | xargs`
PORT=`jq '.listenPort' ${1}`

# Start test client
dub run pgator:test --build=unittest -- "$ADDRESS_UNQUOTED" "$PORT"
{'fraction_non_alphanumeric': 0.16031537450722733, 'fraction_numerical': 0.010512483574244415, 'mean_word_length': 4.661710037174721, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '385488', 'n_tokens_mistral': 576, 'n_tokens_neox': 553, 'n_words': 155}