Use a larger data chunk to test compression (#4115)
Test that compression is on by default by having one file be large and easily compressible. Compression is indirectly checked by looking at how many bytes were uploaded. --- #### Does this PR need a docs update or release note? - [ ] ✅ Yes, it's included - [ ] 🕐 Yes, but in a later PR - [x] ⛔ No #### Type of change - [ ] 🌻 Feature - [ ] 🐛 Bugfix - [ ] 🗺️ Documentation - [x] 🤖 Supportability/Tests - [ ] 💻 CI/Deployment - [x] 🧹 Tech Debt/Cleanup #### Issue(s) * closes #3156 #### Test Plan - [x] 💪 Manual - [ ] ⚡ Unit test - [ ] 💚 E2E
This commit is contained in:
parent
bc404d9208
commit
88a6e6d374
@ -5,6 +5,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"io"
|
"io"
|
||||||
stdpath "path"
|
stdpath "path"
|
||||||
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -765,18 +766,24 @@ func (suite *KopiaIntegrationSuite) TearDownTest() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (suite *KopiaIntegrationSuite) TestBackupCollections() {
|
func (suite *KopiaIntegrationSuite) TestBackupCollections() {
|
||||||
|
c1 := exchMock.NewCollection(
|
||||||
|
suite.storePath1,
|
||||||
|
suite.locPath1,
|
||||||
|
5)
|
||||||
|
// Add a 4k chunk of data that should be compressible. This helps check
|
||||||
|
// compression is enabled because we do some testing on the number of bytes
|
||||||
|
// uploaded during the first backup.
|
||||||
|
c1.Data[0] = []byte(strings.Repeat("abcdefgh", 512))
|
||||||
|
|
||||||
collections := []data.BackupCollection{
|
collections := []data.BackupCollection{
|
||||||
exchMock.NewCollection(
|
c1,
|
||||||
suite.storePath1,
|
|
||||||
suite.locPath1,
|
|
||||||
5),
|
|
||||||
exchMock.NewCollection(
|
exchMock.NewCollection(
|
||||||
suite.storePath2,
|
suite.storePath2,
|
||||||
suite.locPath2,
|
suite.locPath2,
|
||||||
42),
|
42),
|
||||||
}
|
}
|
||||||
|
|
||||||
c1 := exchMock.NewCollection(
|
c1 = exchMock.NewCollection(
|
||||||
suite.storePath1,
|
suite.storePath1,
|
||||||
suite.locPath1,
|
suite.locPath1,
|
||||||
0)
|
0)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user