@@ -3,8 +3,7 @@ import nock from 'nock';
33import { decodeJwt } from '../jwt' ;
44import {
55 mockFetchDestinationCalls ,
6- mockFetchDestinationCallsNotFound ,
7- mockVerifyJwt
6+ mockFetchDestinationCallsNotFound
87} from '../../../../../test-resources/test/test-util/destination-service-mocks' ;
98import {
109 connectivityProxyConfigMock ,
@@ -120,7 +119,6 @@ describe('destination cache', () => {
120119
121120 describe ( 'caching' , ( ) => {
122121 beforeEach ( ( ) => {
123- mockVerifyJwt ( ) ;
124122 mockServiceBindings ( ) ;
125123 mockServiceToken ( ) ;
126124
@@ -234,7 +232,6 @@ describe('destination cache', () => {
234232 } ) ;
235233
236234 it ( 'caches only subscriber if selection strategy always subscriber' , async ( ) => {
237- mockVerifyJwt ( ) ;
238235 await getDestination ( {
239236 destinationName : 'SubscriberDest' ,
240237 jwt : subscriberUserToken ,
@@ -251,7 +248,6 @@ describe('destination cache', () => {
251248 } ) ;
252249
253250 it ( 'caches nothing if the destination is not found' , async ( ) => {
254- mockVerifyJwt ( ) ;
255251 mockFetchDestinationCallsNotFound ( 'ANY' , {
256252 serviceToken : subscriberServiceToken ,
257253 mockWithTokenRetrievalCall : false
@@ -273,7 +269,6 @@ describe('destination cache', () => {
273269 } ) ;
274270
275271 it ( 'caches only the found destination not other ones received from the service' , async ( ) => {
276- mockVerifyJwt ( ) ;
277272 await getDestination ( {
278273 destinationName : 'SubscriberDest2' ,
279274 jwt : subscriberUserToken ,
@@ -305,7 +300,6 @@ describe('destination cache', () => {
305300 beforeEach ( ( ) => {
306301 mockServiceBindings ( { xsuaaBinding : false } ) ;
307302 mockServiceToken ( ) ;
308- mockVerifyJwt ( ) ;
309303 } ) ;
310304
311305 const destName = destinationOne . name ! ;
@@ -414,7 +408,6 @@ describe('destination cache', () => {
414408 describe ( 'caching of destinations with special information (e.g. authTokens, certificates)' , ( ) => {
415409 it ( 'destinations with certificates are cached ' , async ( ) => {
416410 mockServiceBindings ( ) ;
417- mockVerifyJwt ( ) ;
418411 mockServiceToken ( ) ;
419412 mockJwtBearerToken ( ) ;
420413
@@ -456,7 +449,6 @@ describe('destination cache', () => {
456449
457450 it ( 'destinations with authTokens are cached correctly' , async ( ) => {
458451 mockServiceBindings ( ) ;
459- mockVerifyJwt ( ) ;
460452 mockServiceToken ( ) ;
461453 mockJwtBearerToken ( ) ;
462454
@@ -507,7 +499,6 @@ describe('destination cache', () => {
507499
508500 it ( 'destinations with proxy configuration are cached correctly' , async ( ) => {
509501 mockServiceBindings ( ) ;
510- mockVerifyJwt ( ) ;
511502 mockServiceToken ( ) ;
512503 mockJwtBearerToken ( ) ;
513504
@@ -568,8 +559,6 @@ describe('destination cache', () => {
568559 it ( 'retrieves subscriber cached destination' , async ( ) => {
569560 mockServiceBindings ( ) ;
570561 mockServiceToken ( ) ;
571- mockVerifyJwt ( ) ;
572-
573562 const authType = 'NoAuthentication' as AuthenticationType ;
574563 const subscriberDest = {
575564 URL : 'https://subscriber.example' ,
@@ -597,7 +586,6 @@ describe('destination cache', () => {
597586
598587 it ( 'retrieves provider cached destination' , async ( ) => {
599588 mockServiceBindings ( ) ;
600- mockVerifyJwt ( ) ;
601589 mockServiceToken ( ) ;
602590
603591 const authType = 'NoAuthentication' as AuthenticationType ;
@@ -627,7 +615,6 @@ describe('destination cache', () => {
627615
628616 it ( 'should return cached provider destination from cache after checking for remote subscriber destination when subscriberFirst is specified and destinations are tenant isolated' , async ( ) => {
629617 mockServiceBindings ( ) ;
630- mockVerifyJwt ( ) ;
631618 mockServiceToken ( ) ;
632619
633620 const authType = 'NoAuthentication' as AuthenticationType ;
0 commit comments