<commit_before>const assert = require('assert');
const pgEntitiesAccessValidator = require('../../app/services/pg-entities-access-validator');

const fakeAffectedTables = [{
    schema_name: 'schema',
    table_name: 'untitled_table'
}];

const fakeAffectedTablesCarto = [{
    schema_name: 'carto',
    table_name: 'untitled_table'
}];

const fakeAffectedTablesCartodbOK = [{
    schema_name: 'cartodb',
    table_name: 'untitled_table'
}];

const fakeAffectedTablesCartodbKO = [
    {
        schema_name: 'cartodb',
        table_name: 'untitled_table'
    },
    {
        schema_name: 'cartodb',
        table_name: 'cdb_tablemetadata'
    }
];

const fakeAffectedTablesPgcatalog = [{
    schema_name: 'pg_catalog',
    table_name: 'pg_catalog'
}];

const fakeAffectedTablesInfo = [{
    schema_name: 'information_schema',
    table_name: 'untitled_table'
}];

const fakeAffectedTablesPublicOK = [{
    schema_name: 'public',
    table_name: 'untitled_table'
}];

const fakeAffectedTablesPublicKO = [
    {
        schema_name: 'public',
        table_name: 'spatial_ref_sys'
    },
    {
        schema_name: 'public',
        table_name: 'untitled_table'
    }
];

const fakeAffectedTablesTopologyOK = [{
    schema_name: 'topology',
    table_name: 'untitled_table'
}];

const fakeAffectedTablesTopologyKO = [
    {
        schema_name: 'topology',
        table_name: 'layer'
    },
    {
        schema_name: 'topology',
        table_name: 'untitled_table'
    }
];



describe.only('pg entities access validator with validatePGEntitiesAccess enabled', function () {
    before(function() {
        global.validatePGEntitiesAccess = true;
    });

    after(function() {
        global.validatePGEntitiesAccess = false;<commit_msg>forgotten 'only'<commit_after>const assert = require('assert');
const pgEntitiesAccessValidator = require('../../app/services/pg-entities-access-validator');

const fakeAffectedTables = [{
    schema_name: 'schema',
    table_name: 'untitled_table'
}];

const fakeAffectedTablesCarto = [{
    schema_name: 'carto',
    table_name: 'untitled_table'
}];

const fakeAffectedTablesCartodbOK = [{
    schema_name: 'cartodb',
    table_name: 'untitled_table'
}];

const fakeAffectedTablesCartodbKO = [
    {
        schema_name: 'cartodb',
        table_name: 'untitled_table'
    },
    {
        schema_name: 'cartodb',
        table_name: 'cdb_tablemetadata'
    }
];

const fakeAffectedTablesPgcatalog = [{
    schema_name: 'pg_catalog',
    table_name: 'pg_catalog'
}];

const fakeAffectedTablesInfo = [{
    schema_name: 'information_schema',
    table_name: 'untitled_table'
}];

const fakeAffectedTablesPublicOK = [{
    schema_name: 'public',
    table_name: 'untitled_table'
}];

const fakeAffectedTablesPublicKO = [
    {
        schema_name: 'public',
        table_name: 'spatial_ref_sys'
    },
    {
        schema_name: 'public',
        table_name: 'untitled_table'
    }
];

const fakeAffectedTablesTopologyOK = [{
    schema_name: 'topology',
    table_name: 'untitled_table'
}];

const fakeAffectedTablesTopologyKO = [
    {
        schema_name: 'topology',
        table_name: 'layer'
    },
    {
        schema_name: 'topology',
        table_name: 'untitled_table'
    }
];



describe('pg entities access validator with validatePGEntitiesAccess enabled', function () {
    before(function() {
        global.validatePGEntitiesAccess = true;
    });

    after(function() {
        global.validatePGEntitiesAccess = false;
{'fraction_non_alphanumeric': 0.12148190695002872, 'fraction_numerical': 0.0, 'mean_word_length': 3.370138017565872, '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': '5317208', 'n_tokens_mistral': 1160, 'n_tokens_neox': 1130, 'n_words': 184}