File tree Expand file tree Collapse file tree
x-pack/test/security_api_integration/tests/features Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -316,13 +316,25 @@ export default function ({ getService }: FtrProviderContext) {
316316 for ( const deprecatedAction of deprecatedActions ) {
317317 if (
318318 isReplaceableAction ( deprecatedAction ) &&
319- ! replacementActions . has ( deprecatedAction )
319+ ! replacementActions . delete ( deprecatedAction )
320320 ) {
321321 throw new Error (
322322 `Action "${ deprecatedAction } " granted by the privilege "${ privilegeId } " of the deprecated feature "${ feature . id } " is not properly replaced.`
323323 ) ;
324324 }
325325 }
326+
327+ const extraReplacementActions =
328+ Array . from ( replacementActions ) . filter ( isReplaceableAction ) ;
329+ if ( extraReplacementActions . length > 0 ) {
330+ log . warning (
331+ `Replacement actions for the privilege "${ privilegeId } " of the deprecated feature "${
332+ feature . id
333+ } " grant more privileges than they were granting before: ${ JSON . stringify (
334+ extraReplacementActions
335+ ) } via ${ JSON . stringify ( replacedBy ) } .`
336+ ) ;
337+ }
326338 }
327339 }
328340 } ) ;
You can’t perform that action at this time.
0 commit comments