FIX: disk_space refresh is now on demand

This commit is contained in:
Joffrey JAFFEUX 2018-08-01 10:06:20 -04:00 committed by GitHub
parent 0b9437cee7
commit 499ed469b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 22 deletions

View File

@ -98,20 +98,6 @@ describe Backup do
SiteSetting.enable_s3_backups = true
end
it "should upload the backup to S3 with the right paths" do
s3_helper.expects(:s3_bucket).returns(s3_bucket)
s3_object = stub
s3_bucket.expects(:object).with(b1.filename).returns(s3_object)
s3_object.expects(:delete)
expect {
b1.after_remove_hook
}.to change {
Jobs::UpdateDiskSpace.jobs.size
}.by(0)
end
context "when s3_backup_bucket includes folders path" do
before do
SiteSetting.s3_backup_bucket = "s3-upload-bucket/discourse-backups"
@ -138,14 +124,6 @@ describe Backup do
b1.expects(:remove_from_s3).never
b1.after_remove_hook
end
it "refreshes disk space if not backuping on s3" do
expect {
b1.after_remove_hook
}.to change {
Jobs::UpdateDiskSpace.jobs.size
}.by(1)
end
end
end