You've already forked pgbackrest
							
							
				mirror of
				https://github.com/pgbackrest/pgbackrest.git
				synced 2025-10-30 23:37:45 +02:00 
			
		
		
		
	Remove info expect tests from mock/all and mock/stanza.
These tests are redundant now that we have full coverage in the unit tests are are not worth maintaining anymore.
This commit is contained in:
		
				
					committed by
					
						 David Steele
						David Steele
					
				
			
			
				
	
			
			
			
						parent
						
							e4408c7dd3
						
					
				
				
					commit
					2972580566
				
			| @@ -308,11 +308,6 @@ sub run | ||||
|             $oHostDbMaster->executeSimple($self->backrestExe() . " help version", {oLogTest => $self->expect()}); | ||||
|         } | ||||
|  | ||||
|         # Backup Info (with no stanzas) | ||||
|         #--------------------------------------------------------------------------------------------------------------------------- | ||||
|         $oHostDbMaster->info('no stanzas exist'); | ||||
|         $oHostDbMaster->info('no stanzas exist', {strOutput => CFGOPTVAL_INFO_OUTPUT_JSON}); | ||||
|  | ||||
|         # Full backup | ||||
|         #--------------------------------------------------------------------------------------------------------------------------- | ||||
|         my $strType = CFGOPTVAL_BACKUP_TYPE_FULL; | ||||
| @@ -1259,11 +1254,6 @@ sub run | ||||
|         $strFullBackup = $oHostBackup->backup( | ||||
|             $strType, 'update file', {oExpectedManifest => \%oManifest}); | ||||
|  | ||||
|         # Backup Info | ||||
|         #--------------------------------------------------------------------------------------------------------------------------- | ||||
|         $oHostDbMaster->info('normal output', {strStanza => $oHostDbMaster->stanza()}); | ||||
|         $oHostBackup->info('normal output', {strStanza => $oHostBackup->stanza(), strOutput => CFGOPTVAL_INFO_OUTPUT_JSON}); | ||||
|  | ||||
|         # Call expire | ||||
|         #--------------------------------------------------------------------------------------------------------------------------- | ||||
|         $oHostBackup->expire({iRetentionFull => 1}); | ||||
| @@ -1354,16 +1344,6 @@ sub run | ||||
|         $oManifest{&MANIFEST_SECTION_BACKUP_TARGET}{'pg_tblspc/2'}{&MANIFEST_SUBKEY_PATH} = '../../tablespace/ts2'; | ||||
|         $oManifest{&MANIFEST_SECTION_TARGET_LINK}{'pg_data/pg_tblspc/2'}{&MANIFEST_SUBKEY_DESTINATION} = '../../tablespace/ts2'; | ||||
|  | ||||
|         # Backup Info (with an empty stanza) | ||||
|         #--------------------------------------------------------------------------------------------------------------------------- | ||||
|         forceStorageMode(storageRepo(), 'backup', 'g+w'); | ||||
|         storageRepo()->pathCreate(storageRepo()->pathGet('backup/db_empty'), {strMode => '0770'}); | ||||
|  | ||||
|         $oHostBackup->info('normal output'); | ||||
|         $oHostDbMaster->info('normal output', {strOutput => CFGOPTVAL_INFO_OUTPUT_JSON}); | ||||
|         $oHostBackup->info('bogus stanza', {strStanza => BOGUS}); | ||||
|         $oHostDbMaster->info('bogus stanza', {strStanza => BOGUS, strOutput => CFGOPTVAL_INFO_OUTPUT_JSON}); | ||||
|  | ||||
|         # Dump out history path at the end to verify all history files are being recorded.  This test is only performed locally | ||||
|         # because for some reason sort order is different when this command is executed via ssh (even though the content of the | ||||
|         # directory is identical). | ||||
|   | ||||
| @@ -231,7 +231,7 @@ sub run | ||||
|         # Restore archive.info | ||||
|         forceStorageMove(storageRepo(), $strArchiveInfoOldFile, $strArchiveInfoFile, {bRecurse => false}); | ||||
|  | ||||
|         # Push a WAL and create a backup in the new DB to confirm diff changed to full and info command displays the JSON correctly | ||||
|         # Push a WAL and create a backup in the new DB to confirm diff changed to full | ||||
|         #-------------------------------------------------------------------------------------------------------------------------- | ||||
|         storageTest()->put($strArchiveTestFile, $self->walGenerateContent(PG_VERSION_95)); | ||||
|         $oHostDbMaster->archivePush($strWalPath, $strArchiveTestFile, 1); | ||||
| @@ -241,9 +241,6 @@ sub run | ||||
|             {strOptionalParam => '--repo1-retention-full=2 --no-' . cfgOptionName(CFGOPT_ONLINE)}); | ||||
|         $oHostBackup->backupEnd('full', $oExecuteBackup, undef, false); | ||||
|  | ||||
|         # Confirm info command displays the JSON correctly | ||||
|         $oHostDbMaster->info('db upgraded - db-1 and db-2 listed', {strOutput => CFGOPTVAL_INFO_OUTPUT_JSON}); | ||||
|  | ||||
|         # Delete the stanza | ||||
|         #-------------------------------------------------------------------------------------------------------------------------- | ||||
|         $oHostBackup->stanzaDelete('fail on missing stop file', {iExpectedExitStatus => ERROR_FILE_MISSING}); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user