<commit_before>#!/bin/bash

wget https://github.com/sagiegurari/simple-oracledb/archive/master.zip
unzip -q master.zip
cd ./simple-oracledb-master

export OCI_LIB_DIR="/opt/oracle/instantclient"

echo "----------------"
echo "OCI_LIB_DIR: $OCI_LIB_DIR"
echo "----------------"
echo "OCI_INCLUDE_DIR: $OCI_INCLUDE_DIR"
echo "----------------"

npm --loglevel error install

npm --loglevel error --production --unsafe-perm install oracledb

export TEST_ORACLE_CONNECTION_STRING="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=${DB_PORT_1521_TCP_ADDR})(PORT=${DB_PORT_1521_TCP_PORT}))(CONNECT_DATA=(SID=xe)))"

echo "TEST_ORACLE_USER: ${TEST_ORACLE_USER}"
echo "TEST_ORACLE_PASSWORD: ${TEST_ORACLE_PASSWORD}"
echo "TEST_ORACLE_CONNECTION_STRING: ${TEST_ORACLE_CONNECTION_STRING}"

#wait for db to be up
sleep 60

mocha --exit ./test/spec/integration-spec.js<commit_msg>integration test<commit_after>#!/bin/bash

wget https://github.com/sagiegurari/simple-oracledb/archive/master.zip
unzip -q master.zip
cd ./simple-oracledb-master

export OCI_LIB_DIR="/opt/oracle/instantclient"

echo "----------------"
echo "OCI_LIB_DIR: $OCI_LIB_DIR"
echo "----------------"
echo "OCI_INCLUDE_DIR: $OCI_INCLUDE_DIR"
echo "----------------"

npm --loglevel error -g install mocha

npm --loglevel error install

npm --loglevel error --production --unsafe-perm install oracledb

export TEST_ORACLE_CONNECTION_STRING="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=${DB_PORT_1521_TCP_ADDR})(PORT=${DB_PORT_1521_TCP_PORT}))(CONNECT_DATA=(SID=xe)))"

echo "TEST_ORACLE_USER: ${TEST_ORACLE_USER}"
echo "TEST_ORACLE_PASSWORD: ${TEST_ORACLE_PASSWORD}"
echo "TEST_ORACLE_CONNECTION_STRING: ${TEST_ORACLE_CONNECTION_STRING}"

#wait for db to be up
sleep 60

mocha --exit ./test/spec/integration-spec.js
{'fraction_non_alphanumeric': 0.17970521541950113, 'fraction_numerical': 0.011337868480725623, 'mean_word_length': 4.73051948051948, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '908187', 'n_tokens_mistral': 678, 'n_tokens_neox': 637, 'n_words': 110}