@@ -640,7 +640,11 @@ t.test('publish existing package with provenance in gha', async t => {
640640 entryPoint : workflowPath ,
641641 }
642642
643- const { publish } = t . mock ( '..' , { 'ci-info' : t . mock ( 'ci-info' ) } )
643+ const log = [ ]
644+ const { publish } = t . mock ( '..' , {
645+ 'ci-info' : t . mock ( 'ci-info' ) ,
646+ 'proc-log' : { notice : ( ...msg ) => log . push ( [ 'notice' , ...msg ] ) } ,
647+ } )
644648 const registry = new MockRegistry ( {
645649 tap : t ,
646650 registry : opts . registry ,
@@ -670,6 +674,7 @@ t.test('publish existing package with provenance in gha', async t => {
670674 const rekorURL = 'https://mock.rekor'
671675 const signature = 'ABC123'
672676 const b64Cert = Buffer . from ( leafCertificate ) . toString ( 'base64' )
677+ const logIndex = 2513258
673678 const uuid =
674679 '69e5a0c1663ee4452674a5c9d5050d866c2ee31e2faaf79913aea7cc27293cf6'
675680
@@ -692,7 +697,7 @@ t.test('publish existing package with provenance in gha', async t => {
692697 integratedTime : 1654015743 ,
693698 logID :
694699 'c0d23d6ad406973f9559f3ba2d1ca01f84147d8ffc5b8445c224f98b9591801d' ,
695- logIndex : 2513258 ,
700+ logIndex,
696701 verification : {
697702 /* eslint-disable-next-line max-len */
698703 signedEntryTimestamp : 'MEUCIQD6CD7ZNLUipFoxzmSL/L8Ewic4SRkXN77UjfJZ7d/wAAIgatokSuX9Rg0iWxAgSfHMtcsagtDCQalU5IvXdQ+yLEA=' ,
@@ -789,6 +794,13 @@ t.test('publish existing package with provenance in gha', async t => {
789794 rekorURL : rekorURL ,
790795 } )
791796 t . ok ( ret , 'publish succeeded' )
797+ t . match ( log , [
798+ [ 'notice' , 'publish' ,
799+ 'Signed provenance statement with source and build information from GitHub Actions' ] ,
800+ [ 'notice' , 'publish' ,
801+ /* eslint-disable-next-line max-len */
802+ `Provenance statement published to transparency log: https://search.sigstore.dev/?logIndex=${ logIndex } ` ] ,
803+ ] )
792804} )
793805
794806t . test ( 'publish new/private package with provenance in gha - no access' , async t => {
0 commit comments