summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/api/client/admin/mediacleanup_test.go6
-rw-r--r--internal/db/bundb/media_test.go2
-rw-r--r--internal/media/pruneremote_test.go8
3 files changed, 8 insertions, 8 deletions
diff --git a/internal/api/client/admin/mediacleanup_test.go b/internal/api/client/admin/mediacleanup_test.go
index 967f2c528..62f8474a0 100644
--- a/internal/api/client/admin/mediacleanup_test.go
+++ b/internal/api/client/admin/mediacleanup_test.go
@@ -35,7 +35,7 @@ type MediaCleanupTestSuite struct {
}
func (suite *MediaCleanupTestSuite) TestMediaCleanup() {
- testAttachment := suite.testAttachments["remote_account_1_status_1_attachment_2"]
+ testAttachment := suite.testAttachments["remote_account_1_status_1_attachment_1"]
suite.True(*testAttachment.Cached)
// set up the request
@@ -60,7 +60,7 @@ func (suite *MediaCleanupTestSuite) TestMediaCleanup() {
}
func (suite *MediaCleanupTestSuite) TestMediaCleanupNoArg() {
- testAttachment := suite.testAttachments["remote_account_1_status_1_attachment_2"]
+ testAttachment := suite.testAttachments["remote_account_1_status_1_attachment_1"]
suite.True(*testAttachment.Cached)
println("TIME: ", testAttachment.CreatedAt.String())
@@ -85,7 +85,7 @@ func (suite *MediaCleanupTestSuite) TestMediaCleanupNoArg() {
}
func (suite *MediaCleanupTestSuite) TestMediaCleanupNotOldEnough() {
- testAttachment := suite.testAttachments["remote_account_1_status_1_attachment_2"]
+ testAttachment := suite.testAttachments["remote_account_1_status_1_attachment_1"]
suite.True(*testAttachment.Cached)
// set up the request
diff --git a/internal/db/bundb/media_test.go b/internal/db/bundb/media_test.go
index 612020108..139a4b780 100644
--- a/internal/db/bundb/media_test.go
+++ b/internal/db/bundb/media_test.go
@@ -41,7 +41,7 @@ func (suite *MediaTestSuite) TestGetAttachmentByID() {
func (suite *MediaTestSuite) TestGetOlder() {
attachments, err := suite.db.GetRemoteOlderThan(context.Background(), time.Now(), 20)
suite.NoError(err)
- suite.Len(attachments, 3)
+ suite.Len(attachments, 2)
}
func (suite *MediaTestSuite) TestGetAvisAndHeaders() {
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) {