@@ -411,18 +411,17 @@ test("does not save overlay status when OverlayAnalysisStatusSave feature flag i
411411 } ) ;
412412} ) ;
413413
414- test ( "saves overlay status recording successful build when analysis completed successfully " , async ( t ) => {
414+ test ( "does not save overlay status when build successful " , async ( t ) => {
415415 return await util . withTmpDir ( async ( tmpDir ) => {
416416 process . env [ "GITHUB_REPOSITORY" ] = "github/codeql-action-fake-repository" ;
417417 process . env [ "RUNNER_TEMP" ] = tmpDir ;
418418 // Mark analyze as having completed successfully.
419419 process . env [ EnvVar . ANALYZE_DID_COMPLETE_SUCCESSFULLY ] = "true" ;
420420
421- const diskUsage : util . DiskUsage = {
421+ sinon . stub ( util , "checkDiskUsage" ) . resolves ( {
422422 numAvailableBytes : 100 * 1024 * 1024 * 1024 ,
423423 numTotalBytes : 200 * 1024 * 1024 * 1024 ,
424- } ;
425- sinon . stub ( util , "checkDiskUsage" ) . resolves ( diskUsage ) ;
424+ } ) ;
426425
427426 const saveOverlayStatusStub = sinon
428427 . stub ( overlayStatus , "saveOverlayStatus" )
@@ -443,16 +442,8 @@ test("saves overlay status recording successful build when analysis completed su
443442 ) ;
444443
445444 t . true (
446- saveOverlayStatusStub . calledOnce ,
447- "saveOverlayStatus should be called exactly once" ,
448- ) ;
449- t . deepEqual (
450- saveOverlayStatusStub . firstCall . args [ 3 ] ,
451- {
452- attemptedToBuildOverlayBaseDatabase : true ,
453- builtOverlayBaseDatabase : true ,
454- } ,
455- "fourth arg should be the overlay status recording a successful build attempt" ,
445+ saveOverlayStatusStub . notCalled ,
446+ "saveOverlayStatus should not be called when build completed successfully" ,
456447 ) ;
457448 } ) ;
458449} ) ;
0 commit comments