Produced by Araxis Merge on 10/4/2017 9:15:14 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.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | vista-js.zip\vista-js\tests\integration | authenticate-itest-spec.js | Tue Sep 27 13:46:04 2016 UTC |
| 2 | vista-js.zip\vista-js\tests\integration | authenticate-itest-spec.js | Wed Oct 4 14:04:51 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 4 | 210 |
| Changed | 3 | 16 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| 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 |
No regular expressions were active.
| 1 | 'use stric t'; | |
| 2 | ||
| 3 | var _ = re quire('und erscore'); | |
| 4 | ||
| 5 | // var log ger = requ ire(global .VX_DUMMIE S + 'dummy -logger'); | |
| 6 | ||
| 7 | var logger = require ('bunyan') .createLog ger({ | |
| 8 | na me: 'test: VistaJS-au thenticate ', | |
| 9 | le vel: 'fata l' | |
| 10 | }); | |
| 11 | ||
| 12 | var wConfi g = requir e('./confi g'); | |
| 13 | var authen ticate = r equire('.. /../src/Rp cClient'). RpcClient. authentica te; | |
| 14 | ||
| 15 | var config = _.defau lts(wConfi g.vistaSit es[' SIT E
|
|
| 16 | ho st: ' IP ', | |
| 17 | po rt: PORT , | |
| 18 | ac cessCode: ' PL ', | |
| 19 | ve rifyCode: ' PW ', | |
| 20 | co ntext: 'HM P SYNCHRON IZATION CO NTEXT', | |
| 21 | lo calIP: '12 7.0.0.1', | |
| 22 | lo calAddress : 'localho st', | |
| 23 | co nnectTimeo ut: 1000, | |
| 24 | se ndTimeout: 5000 | |
| 25 | }); | |
| 26 | ||
| 27 | describe(' verify Rpc Client.aut henticate( ) against Panorama', function( ) { | |
| 28 | de scribe('ve rify corre ct config info yield s good res ult', func tion() { | |
| 29 | it(' verified', function( ) { | |
| 30 | var te stError; | |
| 31 | var te stResult; | |
| 32 | var ca lled = fal se; | |
| 33 | ||
| 34 | var ex pectedErro r = null; | |
| 35 | var ex pectedResu lt = { | |
| 36 | accessCode : ' PL ', | |
| 37 | verifyCode : ' PW ', | |
| 38 | duz: jas mine.any(S tring), | |
| 39 | greeting : jasmine. any(String ) | |
| 40 | }; | |
| 41 | ||
| 42 | functi on callbac k(error, r esult) { | |
| 43 | called = true; | |
| 44 | testErro r = error; | |
| 45 | testResu lt = resul t; | |
| 46 | } | |
| 47 | ||
| 48 | authen ticate(log ger, confi g, callbac k); | |
| 49 | ||
| 50 | waitsF or(functio n() { | |
| 51 | return c alled; | |
| 52 | }, 'sh ould be ca lled', 500 0); | |
| 53 | ||
| 54 | runs(f unction() { | |
| 55 | expect(t estError). toEqual(ex pectedErro r); | |
| 56 | expect(t estResult) .toEqual(e xpectedRes ult); | |
| 57 | }); | |
| 58 | }); | |
| 59 | }) ; | |
| 60 | ||
| 61 | de scribe('ve rify incor rect confi g info yie lds error result', f unction() { | |
| 62 | it(' verified', function( ) { | |
| 63 | var te stError; | |
| 64 | var te stResult; | |
| 65 | var ca lled = fal se; | |
| 66 | ||
| 67 | functi on callbac k(error, r esult) { | |
| 68 | called = true; | |
| 69 | testErro r = error; | |
| 70 | testResu lt = resul t; | |
| 71 | } | |
| 72 | ||
| 73 | var co nf = _.clo ne(config) ; | |
| 74 | conf.port = PORT ; | |
| 75 | authen ticate(log ger, conf, callback) ; | |
| 76 | ||
| 77 | waitsF or(functio n() { | |
| 78 | return c alled; | |
| 79 | }, 'sh ould be ca lled', 100 00); | |
| 80 | ||
| 81 | runs(f unction() { | |
| 82 | expect(t estError). not.toBeNu ll(); | |
| 83 | }); | |
| 84 | }); | |
| 85 | }) ; | |
| 86 | ||
| 87 | descri be('verify invalid v erify code yields er ror', func tion() { | |
| 88 | it ('verified ', functio n() { | |
| 89 | var test Error; | |
| 90 | var call ed = false ; | |
| 91 | ||
| 92 | var expe ctedError = 'Not a v alid ACCES S CODE/VER IFY CODE p air.'; | |
| 93 | ||
| 94 | function callback( error, res ult) { | |
| 95 | call ed = true; | |
| 96 | test Error = er ror; | |
| 97 | } | |
| 98 | ||
| 99 | config.v erifyCode= "dfssd"; | |
| 100 | ||
| 101 | authenti cate(logge r, config, callback) ; | |
| 102 | ||
| 103 | waitsFor (function( ) { | |
| 104 | retu rn called; | |
| 105 | }, 'shou ld be call ed', 5000) ; | |
| 106 | ||
| 107 | runs(fun ction() { | |
| 108 | expe ct(testErr or).toEqua l(expected Error); | |
| 109 | }); | |
| 110 | }) ; | |
| 111 | }); | |
| 112 | ||
| 113 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.