<commit_before>/**
 * Main test script to run tests
 **/
var config = require('../config');
var constants = require('../constants.js');
var redis = require('../store/redis');
var queue = require('../store/queue');
//var cassandra = require('../store/cassandra');
var queries = require('../store/queries');
config.PORT = ""; //use service defaults
config.POSTGRES_URL = "postgres://postgres:postgres@localhost/yasp_test";
config.REDIS_URL = "redis://localhost:6379/1";
config.SESSION_SECRET = "testsecretvalue";
config.NODE_ENV = "test";
config.ENABLE_MATCH_CACHE = 1;
config.FRONTEND_PORT = 5001;
config.PARSER_PORT = 5201;
var async = require('async');
var nock = require('nock');
var moment = require('moment');
var assert = require('assert');
var init_db = "postgres://postgres:postgres@localhost/postgres";
var pQueue = queue.getQueue('parse');
var supertest = require('supertest');
var replay_dir = "./test/testfiles/";
var pg = require('pg');
var fs = require('fs');
var wait = 90000;
// these are loaded later, as the database needs to be created when these are required
var db;
var app;
var details_api = require('./details_api.json');
//nock.disableNetConnect();
//nock.enableNetConnect();
//fake api response
nock('http://api.steampowered.com')
    //500 error
    .get('/IDOTA2Match_570/GetMatchDetails/V001/').query(true).reply(500,
    {})
    //fake match details
    .get('/IDOTA2Match_570/GetMatchDetails/V001/').query(true).times(10).reply(200, details_api)
    //fake player summaries
    .get('/ISteamUser/GetPlayerSummaries/v0002/').query(true).reply(200, require('./summaries_api.json'))<commit_msg>add cassandra connection to test<commit_after>/**
 * Main test script to run tests
 **/
var config = require('../config');
var constants = require('../constants.js');
var redis = require('../store/redis');
var queue = require('../store/queue');
//var cassandra = require('../store/cassandra');
var queries = require('../store/queries');
config.PORT = ""; //use service defaults
config.POSTGRES_URL = "postgres://postgres:postgres@localhost/yasp_test";
config.REDIS_URL = "redis://localhost:6379/1";
config.SESSION_SECRET = "testsecretvalue";
config.NODE_ENV = "test";
config.ENABLE_MATCH_CACHE = 1;
config.FRONTEND_PORT = 5001;
config.PARSER_PORT = 5201;
var async = require('async');
var nock = require('nock');
var moment = require('moment');
var assert = require('assert');
var init_db = "postgres://postgres:postgres@localhost/postgres";
var pQueue = queue.getQueue('parse');
var supertest = require('supertest');
var replay_dir = "./test/testfiles/";
var pg = require('pg');
var fs = require('fs');
var wait = 90000;
var cassandra = require('../store/cassandra');
// these are loaded later, as the database needs to be created when these are required
var db;
var app;
var details_api = require('./details_api.json');
//nock.disableNetConnect();
//nock.enableNetConnect();
//fake api response
nock('http://api.steampowered.com')
    //500 error
    .get('/IDOTA2Match_570/GetMatchDetails/V001/').query(true).reply(500,
    {})
    //fake match details
    .get('/IDOTA2Match_570/GetMatchDetails/V001/').query(true).times(10).reply(200, details_api)
    //fake player summaries
    .get('/ISteamUser/GetPlayerSummaries/v0002/').query(true).reply(200, require('./summaries_api.json'))
{'fraction_non_alphanumeric': 0.17846339987900786, 'fraction_numerical': 0.030852994555353903, 'mean_word_length': 4.853097345132744, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5723747', 'n_tokens_mistral': 1132, 'n_tokens_neox': 1057, 'n_words': 240}