mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 14:42:26 -05:00 
			
		
		
		
	[chore] Inboxes for iri test (#508)
* tidy up some federation tests * add missing license to following.go * give zork some followers, as a treat * test InboxesForIRI * Go fmt * update timeline tests
This commit is contained in:
		
					parent
					
						
							
								f9b351438b
							
						
					
				
			
			
				commit
				
					
						63f84da3e4
					
				
			
		
					 11 changed files with 247 additions and 110 deletions
				
			
		|  | @ -63,6 +63,7 @@ type StatusStandardTestSuite struct { | |||
| 	testAccounts     map[string]*gtsmodel.Account | ||||
| 	testAttachments  map[string]*gtsmodel.MediaAttachment | ||||
| 	testStatuses     map[string]*gtsmodel.Status | ||||
| 	testFollows      map[string]*gtsmodel.Follow | ||||
| 
 | ||||
| 	// module being tested | ||||
| 	statusModule *status.Module | ||||
|  | @ -76,25 +77,27 @@ func (suite *StatusStandardTestSuite) SetupSuite() { | |||
| 	suite.testAccounts = testrig.NewTestAccounts() | ||||
| 	suite.testAttachments = testrig.NewTestAttachments() | ||||
| 	suite.testStatuses = testrig.NewTestStatuses() | ||||
| 	suite.testFollows = testrig.NewTestFollows() | ||||
| } | ||||
| 
 | ||||
| func (suite *StatusStandardTestSuite) SetupTest() { | ||||
| 	testrig.InitTestConfig() | ||||
| 	testrig.InitTestLog() | ||||
| 
 | ||||
| 	fedWorker := worker.New[messages.FromFederator](-1, -1) | ||||
| 	clientWorker := worker.New[messages.FromClientAPI](-1, -1) | ||||
| 
 | ||||
| 	suite.db = testrig.NewTestDB() | ||||
| 	suite.tc = testrig.NewTestTypeConverter(suite.db) | ||||
| 	suite.storage = testrig.NewTestStorage() | ||||
| 	testrig.StandardDBSetup(suite.db, nil) | ||||
| 	testrig.StandardStorageSetup(suite.storage, "../../../../testrig/media") | ||||
| 
 | ||||
| 	fedWorker := worker.New[messages.FromFederator](-1, -1) | ||||
| 	clientWorker := worker.New[messages.FromClientAPI](-1, -1) | ||||
| 
 | ||||
| 	suite.mediaManager = testrig.NewTestMediaManager(suite.db, suite.storage) | ||||
| 	suite.federator = testrig.NewTestFederator(suite.db, testrig.NewTestTransportController(suite.testHttpClient(), suite.db, fedWorker), suite.storage, suite.mediaManager, fedWorker) | ||||
| 	suite.emailSender = testrig.NewEmailSender("../../../../web/template/", nil) | ||||
| 	suite.processor = testrig.NewTestProcessor(suite.db, suite.storage, suite.federator, suite.emailSender, suite.mediaManager, clientWorker, fedWorker) | ||||
| 	suite.statusModule = status.New(suite.processor).(*status.Module) | ||||
| 	testrig.StandardDBSetup(suite.db, nil) | ||||
| 	testrig.StandardStorageSetup(suite.storage, "../../../../testrig/media") | ||||
| } | ||||
| 
 | ||||
| func (suite *StatusStandardTestSuite) TearDownTest() { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue