diff options
author | 2023-01-23 13:39:01 +0100 | |
---|---|---|
committer | 2023-01-23 13:39:01 +0100 | |
commit | 36f62d6e6013db9d7c0f191254173a1f32f7bdf8 (patch) | |
tree | 43fce3e265874be0284bfd83a78eb7c9638b63ae /internal/media/pruneremote_test.go | |
parent | [feature] Implement `/api/v1/reports` endpoints on client API (#1330) (diff) | |
download | gotosocial-36f62d6e6013db9d7c0f191254173a1f32f7bdf8.tar.xz |
[chore] remove funky duplicate attachment in testrig (#1379)
* [chore] remove funky duplicate attachment in testrig
* whoops
Diffstat (limited to 'internal/media/pruneremote_test.go')
-rw-r--r-- | internal/media/pruneremote_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/media/pruneremote_test.go b/internal/media/pruneremote_test.go index 51521422c..6c0409cf9 100644 --- a/internal/media/pruneremote_test.go +++ b/internal/media/pruneremote_test.go @@ -43,7 +43,7 @@ func (suite *PruneRemoteTestSuite) TestPruneRemote() { totalPruned, err := suite.manager.PruneAllRemote(context.Background(), 1) suite.NoError(err) - suite.Equal(3, totalPruned) + suite.Equal(2, totalPruned) prunedAttachment, err := suite.db.GetAttachmentByID(context.Background(), testStatusAttachment.ID) suite.NoError(err) @@ -57,7 +57,7 @@ func (suite *PruneRemoteTestSuite) TestPruneRemote() { func (suite *PruneRemoteTestSuite) TestPruneRemoteTwice() { totalPruned, err := suite.manager.PruneAllRemote(context.Background(), 1) suite.NoError(err) - suite.Equal(3, totalPruned) + suite.Equal(2, totalPruned) // final prune should prune nothing, since the first prune already happened totalPrunedAgain, err := suite.manager.PruneAllRemote(context.Background(), 1) @@ -72,7 +72,7 @@ func (suite *PruneRemoteTestSuite) TestPruneAndRecache() { totalPruned, err := suite.manager.PruneAllRemote(ctx, 1) suite.NoError(err) - suite.Equal(3, totalPruned) + suite.Equal(2, totalPruned) // media should no longer be stored _, err = suite.storage.Get(ctx, testStatusAttachment.File.Path) @@ -135,7 +135,7 @@ func (suite *PruneRemoteTestSuite) TestPruneOneNonExistent() { // Now attempt to prune remote for item with db entry no file totalPruned, err := suite.manager.PruneAllRemote(ctx, 1) suite.NoError(err) - suite.Equal(3, totalPruned) + suite.Equal(2, totalPruned) } func TestPruneRemoteTestSuite(t *testing.T) { |