908. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 10/3/2017 11:16:04 AM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

908.1 Files compared

# Location File Last Modified
1 ehmp.zip\ehmp\ehmp\product\production\vx-sync\tests\unittests\utils poller-utils-spec.js Mon Jul 10 17:46:22 2017 UTC
2 ehmp.zip\ehmp\ehmp\product\production\vx-sync\tests\unittests\utils poller-utils-spec.js Tue Oct 3 13:27:57 2017 UTC

908.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 448
Changed 2 16
Inserted 0 0
Removed 0 0

908.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

908.4 Active regular expressions

No regular expressions were active.

908.5 Comparison detail

  1   'use stric t';
  2  
  3   require('. ./../../en v-setup');
  4  
  5   var _ = re quire('und erscore');
  6  
  7   var poller Utils = re quire(glob al.VX_UTIL S + 'polle r-utils');
  8   var log =  require(gl obal.VX_DU MMIES + 'd ummy-logge r');
  9   // NOTE: b e sure nex t line is  commented  out before  pushing
  10   // log = r equire('bu nyan').cre ateLogger( {
  11   //     nam e: 'poller -utils-spe c',
  12   //     lev el: 'debug '
  13   // });
  14  
  15  
  16  
  17   var config  = {
  18       vistaS ites: {
  19           '9 E7A': {
  20                name: 'p anorama',
  21                  host: ' IP          ',
  22                  port:  PORT ,
  23                  accessCode : ' REDACTED ',
  24                  verifyCode : ' REDACTED ',
  25                localIP:  '127.0.0. 1',
  26                stationN umber: 500 ,
  27                localAdd ress: 'loc alhost',
  28                connectT imeout: 30 00,
  29                sendTime out: 20000
  30           },
  31           C8 77: {
  32                name: 'k odak',
  33                  host: ' IP          ',
  34                  port:  PORT ,
  35                  accessCode : ' REDACTED ',
  36                  verifyCode : ' REDACTED ',
  37                localIP:  '127.0.0. 1',
  38                stationN umber: 500 ,
  39                localAdd ress: 'loc alhost',
  40                connectT imeout: 30 00,
  41                sendTime out: 20000
  42           }
  43       },
  44       handle rProfiles:  {
  45           pr ofileColle ction: {
  46                'default ': 'all',
  47                primary:  [
  48                    'ent erprise-sy nc-request ',
  49                    'vis ta-operati onal-subsc ribe-reque st',
  50  
  51                    'vis ta-9E7A-su bscribe-re quest',
  52                    'vis ta-C877-su bscribe-re quest'
  53                ],
  54           }
  55       },
  56       beanst alk: {
  57           re poUniversa l: {
  58                priority : 10,
  59                delay: 0 ,
  60                ttr: 120 ,
  61                timeout:  10,
  62                initMill is: 1000,
  63                maxMilli s: 15000,
  64                incMilli s: 1000
  65           },
  66           re poDefaults : {
  67                host: '1 27.0.0.1',
  68                port: 50 00,
  69                tubename : 'vx-sync ',
  70                tubePref ix: 'vxs-' ,
  71                jobTypeF orTube: tr ue
  72           },
  73           jo bTypes: {
  74                'enterpr ise-sync-r equest': { },
  75                'vista-o perational -subscribe -request':  {},
  76  
  77  
  78                'vista-9 E7A-subscr ibe-reques t': {},
  79                'vista-C 877-subscr ibe-reques t': {}
  80           }
  81       }
  82   };
  83  
  84   describe(' poller-uti ls.js', fu nction() {
  85       descri be('buildE nvironment ()', funct ion() {
  86           it ('No test  because of  side effe cts', func tion() {}) ;
  87       });
  88  
  89       descri be('parseP ollerOptio ns()', fun ction() {
  90           it ('No test  because co mmand-line  parsing r equired',  function()  {});
  91       });
  92  
  93       descri be('parseS ubscriberO ptions()',  function( ) {
  94           it ('No test  because co mmand-line  parsing r equired',  function()  {});
  95       });
  96  
  97       descri be('parseP aramList() ', functio n() {
  98           it ('Verify E mpty param eter', fun ction() {
  99                expect(p ollerUtils .parsePara mList()).t oEqual({}) ;
  100                expect(p ollerUtils .parsePara mList(null )).toEqual ({});
  101                expect(p ollerUtils .parsePara mList([])) .toEqual({ });
  102                expect(p ollerUtils .parsePara mList({})) .toEqual({ });
  103           }) ;
  104  
  105           it ('Verify s ingle valu e', functi on() {
  106                expect(p ollerUtils .parsePara mList('tes t')).toEqu al({
  107                    test : 1
  108                });
  109           }) ;
  110  
  111           it ('Verify S imple Valu es', funct ion() {
  112                expect(p ollerUtils .parsePara mList(['on e', 'two'] )).toEqual ({
  113                    one:  1,
  114                    two:  1
  115                });
  116           }) ;
  117  
  118           it ('Verify M ultiple Va lues', fun ction() {
  119                expect(p ollerUtils .parsePara mList(['on e', 'one',  'two'])). toEqual({
  120                    one:  2,
  121                    two:  1
  122                });
  123           }) ;
  124  
  125           it ('Verify C omma-separ ated Value s', functi on() {
  126                expect(p ollerUtils .parsePara mList(['on e,two', 'o ne'])).toE qual({
  127                    one:  2,
  128                    two:  1
  129                });
  130           }) ;
  131  
  132           it ('Verify c olon and n umber valu es', funct ion() {
  133                expect(p ollerUtils .parsePara mList(['pr imary', 'p rimary', ' jmeadows,v ler', 'sto rage:2,enr ichment']) ).toEqual( {
  134                    prim ary: 2,
  135                    jmea dows: 1,
  136                    vler : 1,
  137                    stor age: 2,
  138                    enri chment: 1
  139                });
  140           }) ;
  141       });
  142  
  143       descri be('parseA llJobTypes ()', funct ion() {
  144           it ('Verify e mpty value  is false' , function () {
  145                expect(p ollerUtils .parseAllJ obTypes()) .toBe(fals e);
  146                expect(p ollerUtils .parseAllJ obTypes(nu ll)).toBe( false);
  147                expect(p ollerUtils .parseAllJ obTypes('t est')).toB e(false);
  148           }) ;
  149  
  150           it ('Verify c orrect par se of valu es', funct ion() {
  151                expect(p ollerUtils .parseAllJ obTypes({  'all-job-t ypes': fal se })).toB e(false);
  152                expect(p ollerUtils .parseAllJ obTypes({  'all-job-t ypes': tru e })).toBe (true);
  153                expect(p ollerUtils .parseAllJ obTypes({  'all-job-t ypes': 'tr ue' })).to Be(true);
  154                expect(p ollerUtils .parseAllJ obTypes({  'all-job-t ypes': 'TR UE' })).to Be(true);
  155           }) ;
  156       });
  157  
  158       descri be('parseI gnoreInval id()', fun ction() {
  159           it ('Verify e mpty value  is false' , function () {
  160                expect(p ollerUtils .parseIgno reInvalid( )).toBe(fa lse);
  161                expect(p ollerUtils .parseIgno reInvalid( null)).toB e(false);
  162                expect(p ollerUtils .parseIgno reInvalid( 'test')).t oBe(false) ;
  163           }) ;
  164  
  165           it ('Verify c orrect par se of valu es', funct ion() {
  166                expect(p ollerUtils .parseIgno reInvalid( { 'ignore- invalid':  false })). toBe(false );
  167                expect(p ollerUtils .parseIgno reInvalid( { 'ignore- invalid':  true })).t oBe(true);
  168                expect(p ollerUtils .parseIgno reInvalid( { 'ignore- invalid':  'true' })) .toBe(true );
  169                expect(p ollerUtils .parseIgno reInvalid( { 'ignore- invalid':  'TRUE' })) .toBe(true );
  170           }) ;
  171       });
  172  
  173       descri be('parseA utostart() ', functio n() {
  174           it ('Verify e mpty value  is true',  function( ) {
  175                expect(p ollerUtils .parseAuto start(log) ).toBe(tru e);
  176                expect(p ollerUtils .parseAuto start(log,  null)).to Be(true);
  177                expect(p ollerUtils .parseAuto start(log,  'test')). toBe(true) ;
  178           }) ;
  179  
  180           it ('Verify c orrect par se of valu es', funct ion() {
  181                expect(p ollerUtils .parseAuto start(log,  { autosta rt: false  })).toBe(f alse);
  182                expect(p ollerUtils .parseAuto start(log,  { autosta rt: 'false ' })).toBe (false);
  183                expect(p ollerUtils .parseAuto start(log,  { autosta rt: 'FALSE ' })).toBe (false);
  184                expect(p ollerUtils .parseAuto start(log,  { autosta rt: true } )).toBe(tr ue);
  185                expect(p ollerUtils .parseAuto start(log,  { autosta rt: 'true'  })).toBe( true);
  186                expect(p ollerUtils .parseAuto start(log,  { autosta rt: 'TRUE'  })).toBe( true);
  187           }) ;
  188       });
  189  
  190       descri be('parseM ultipleMod e()', func tion() {
  191           it ('Verify e mpty value  is false' , function () {
  192                expect(p ollerUtils .parseMult ipleMode(l og)).toBe( false);
  193                expect(p ollerUtils .parseMult ipleMode(l og, null)) .toBe(fals e);
  194                expect(p ollerUtils .parseMult ipleMode(l og, 'test' )).toBe(fa lse);
  195           }) ;
  196  
  197           it ('Verify c orrect par se of valu es', funct ion() {
  198                expect(p ollerUtils .parseMult ipleMode(l og, { mult iplemode:  undefined  })).toBe(f alse);
  199                expect(p ollerUtils .parseMult ipleMode(l og, { mult iplemode:  false })). toBe(false );
  200                expect(p ollerUtils .parseMult ipleMode(l og, { mult iplemode:  'false' }) ).toBe(fal se);
  201                expect(p ollerUtils .parseMult ipleMode(l og, { mult iplemode:  'FALSE' }) ).toBe(fal se);
  202                expect(p ollerUtils .parseMult ipleMode(l og, { mult iplemode:  true })).t oBe(true);
  203                expect(p ollerUtils .parseMult ipleMode(l og, { mult iplemode:  'true' })) .toBe(true );
  204                expect(p ollerUtils .parseMult ipleMode(l og, { mult iplemode:  'TRUE' })) .toBe(true );
  205           }) ;
  206       });
  207  
  208       descri be('parseS ites()', f unction()  {
  209           it ('Verify E mpty', fun ction() {
  210                expect(p ollerUtils .parseSite s()).toEqu al([]);
  211                expect(p ollerUtils .parseSite s(null)).t oEqual([]) ;
  212                expect(p ollerUtils .parseSite s({})).toE qual([]);
  213                expect(p ollerUtils .parseSite s({ site:  '' })).toE qual([]);
  214           }) ;
  215  
  216           it ('Verify S ingle Site ', functio n() {
  217                expect(p ollerUtils .parseSite s({ site:  'C877' })) .toEqual([ 'C877']);
  218           }) ;
  219  
  220           it ('Verify M ultiple Si tes and Nu meric Site ', functio n() {
  221                expect(p ollerUtils .parseSite s({ site:  ['C877', ' 9E7A', 901 6, '1234'] })).toEqua l(['C877',  '9E7A', ' 9016', '12 34']);
  222           }) ;
  223       });
  224  
  225       // des cribe('fin dInvalidOp tions()',  function()  {
  226       //      it('', fu nction() { });
  227       // });
  228  
  229       // des cribe('str ipRedundan tJobTypesF romProfile s()', func tion() {
  230       //      it('', fu nction() { });
  231       // });
  232   });