mirror of
https://github.com/octoleo/restic.git
synced 2024-11-02 19:49:44 +00:00
Remove integration test for 'optimize'
This commit is contained in:
parent
04b3ce00e2
commit
8d1a5731f3
@ -110,11 +110,6 @@ func cmdRebuildIndex(t testing.TB, global GlobalOptions) {
|
||||
OK(t, cmd.Execute(nil))
|
||||
}
|
||||
|
||||
func cmdOptimize(t testing.TB, global GlobalOptions) {
|
||||
cmd := &CmdOptimize{global: &global}
|
||||
OK(t, cmd.Execute(nil))
|
||||
}
|
||||
|
||||
func cmdLs(t testing.TB, global GlobalOptions, snapshotID string) []string {
|
||||
var buf bytes.Buffer
|
||||
global.stdout = &buf
|
||||
@ -771,25 +766,6 @@ var optimizeTests = []struct {
|
||||
},
|
||||
}
|
||||
|
||||
func TestOptimizeRemoveUnusedBlobs(t *testing.T) {
|
||||
for i, test := range optimizeTests {
|
||||
withTestEnvironment(t, func(env *testEnvironment, global GlobalOptions) {
|
||||
SetupTarTestFixture(t, env.base, test.testFilename)
|
||||
|
||||
for id := range test.snapshots {
|
||||
OK(t, removeFile(filepath.Join(env.repo, "snapshots", id.String())))
|
||||
}
|
||||
|
||||
cmdOptimize(t, global)
|
||||
output := cmdCheckOutput(t, global)
|
||||
|
||||
if len(output) > 0 {
|
||||
t.Errorf("expected no output for check in test %d, got:\n%v", i, output)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestCheckRestoreNoLock(t *testing.T) {
|
||||
withTestEnvironment(t, func(env *testEnvironment, global GlobalOptions) {
|
||||
datafile := filepath.Join("testdata", "small-repo.tar.gz")
|
||||
|
Loading…
Reference in New Issue
Block a user