mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-30 09:06:14 -06:00
rename actions package
This commit is contained in:
parent
e773bba875
commit
175107f6a3
55 changed files with 116 additions and 116 deletions
|
|
@ -53,7 +53,7 @@ func (suite *AccountTestSuite) TestAccountActionSuspend() {
|
|||
|
||||
// Wait for action to finish.
|
||||
if !testrig.WaitFor(func() bool {
|
||||
return suite.state.Actions.TotalRunning() == 0
|
||||
return suite.state.AdminActions.TotalRunning() == 0
|
||||
}) {
|
||||
suite.FailNow("timed out waiting for admin action(s) to finish")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ func (p *Processor) accountActionSuspend(
|
|||
) (string, gtserror.WithCode) {
|
||||
actionID := id.NewULID()
|
||||
|
||||
errWithCode := p.state.Actions.Run(
|
||||
errWithCode := p.state.AdminActions.Run(
|
||||
ctx,
|
||||
>smodel.AdminAction{
|
||||
ID: actionID,
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ package admin_test
|
|||
|
||||
import (
|
||||
"github.com/stretchr/testify/suite"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/actions"
|
||||
adminactions "github.com/superseriousbusiness/gotosocial/internal/admin"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/cleaner"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/db"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/email"
|
||||
|
|
@ -91,7 +91,7 @@ func (suite *AdminStandardTestSuite) SetupTest() {
|
|||
|
||||
suite.db = testrig.NewTestDB(&suite.state)
|
||||
suite.state.DB = suite.db
|
||||
suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
|
||||
suite.state.AdminActions = adminactions.New(suite.state.DB, &suite.state.Workers)
|
||||
suite.tc = typeutils.NewConverter(&suite.state)
|
||||
|
||||
testrig.StartTimelines(
|
||||
|
|
|
|||
|
|
@ -76,10 +76,10 @@ func (p *Processor) createDomainAllow(
|
|||
AccountID: adminAcct.ID,
|
||||
}
|
||||
|
||||
if errWithCode := p.state.Actions.Run(
|
||||
if errWithCode := p.state.AdminActions.Run(
|
||||
ctx,
|
||||
action,
|
||||
p.state.Actions.DomainAllowF(action.ID, domainAllow),
|
||||
p.state.AdminActions.DomainAllowF(action.ID, domainAllow),
|
||||
); errWithCode != nil {
|
||||
return nil, action.ID, errWithCode
|
||||
}
|
||||
|
|
@ -132,10 +132,10 @@ func (p *Processor) deleteDomainAllow(
|
|||
AccountID: adminAcct.ID,
|
||||
}
|
||||
|
||||
if errWithCode := p.state.Actions.Run(
|
||||
if errWithCode := p.state.AdminActions.Run(
|
||||
ctx,
|
||||
action,
|
||||
p.state.Actions.DomainUnallowF(action.ID, domainAllow),
|
||||
p.state.AdminActions.DomainUnallowF(action.ID, domainAllow),
|
||||
); errWithCode != nil {
|
||||
return nil, action.ID, errWithCode
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,10 +77,10 @@ func (p *Processor) createDomainBlock(
|
|||
Text: domainBlock.PrivateComment,
|
||||
}
|
||||
|
||||
if errWithCode := p.state.Actions.Run(
|
||||
if errWithCode := p.state.AdminActions.Run(
|
||||
ctx,
|
||||
action,
|
||||
p.state.Actions.DomainBlockF(action.ID, domainBlock),
|
||||
p.state.AdminActions.DomainBlockF(action.ID, domainBlock),
|
||||
); errWithCode != nil {
|
||||
return nil, action.ID, errWithCode
|
||||
}
|
||||
|
|
@ -133,10 +133,10 @@ func (p *Processor) deleteDomainBlock(
|
|||
AccountID: adminAcct.ID,
|
||||
}
|
||||
|
||||
if errWithCode := p.state.Actions.Run(
|
||||
if errWithCode := p.state.AdminActions.Run(
|
||||
ctx,
|
||||
action,
|
||||
p.state.Actions.DomainUnblockF(action.ID, domainBlock),
|
||||
p.state.AdminActions.DomainUnblockF(action.ID, domainBlock),
|
||||
); errWithCode != nil {
|
||||
return nil, action.ID, errWithCode
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,10 +48,10 @@ func (p *Processor) DomainKeysExpire(
|
|||
AccountID: adminAcct.ID,
|
||||
}
|
||||
|
||||
if errWithCode := p.state.Actions.Run(
|
||||
if errWithCode := p.state.AdminActions.Run(
|
||||
ctx,
|
||||
action,
|
||||
p.state.Actions.DomainKeysExpireF(domain),
|
||||
p.state.AdminActions.DomainKeysExpireF(domain),
|
||||
); errWithCode != nil {
|
||||
return action.ID, errWithCode
|
||||
}
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ func (suite *DomainBlockTestSuite) awaitAction(actionID string) {
|
|||
ctx := context.Background()
|
||||
|
||||
if !testrig.WaitFor(func() bool {
|
||||
return suite.state.Actions.TotalRunning() == 0
|
||||
return suite.state.AdminActions.TotalRunning() == 0
|
||||
}) {
|
||||
suite.FailNow("timed out waiting for admin action(s) to finish")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue