Skip to content

Commit

Permalink
Merge pull request #1 from aaronfern/working
Browse files Browse the repository at this point in the history
Added tests for compaction backward compatibility
  • Loading branch information
abdasgupta authored Jun 9, 2021
2 parents 53a08a7 + bf01c49 commit bb6dc59
Show file tree
Hide file tree
Showing 5 changed files with 924 additions and 19 deletions.
4 changes: 3 additions & 1 deletion pkg/compactor/compactor_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"time"

"github.com/gardener/etcd-backup-restore/pkg/compressor"
brtypes "github.com/gardener/etcd-backup-restore/pkg/types"
"github.com/gardener/etcd-backup-restore/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
Expand Down Expand Up @@ -83,7 +84,8 @@ var _ = SynchronizedBeforeSuite(func() []byte {
compressionConfig := compressor.NewCompressorConfig()
compressionConfig.Enabled = true
compressionConfig.CompressionPolicy = "gzip"
err = utils.RunSnapshotter(logger, testSnapshotDir, deltaSnapshotPeriod, endpoints, ctx.Done(), true, compressionConfig)
snapstoreConfig := brtypes.SnapstoreConfig{Container: testSnapshotDir, Provider: "Local"}
err = utils.RunSnapshotter(logger, snapstoreConfig, deltaSnapshotPeriod, endpoints, ctx.Done(), true, compressionConfig)
Expect(err).ShouldNot(HaveOccurred())

// Wait unitil the populator finishes with populating ETCD
Expand Down
5 changes: 3 additions & 2 deletions pkg/snapshot/restorer/restorer_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"time"

"github.com/gardener/etcd-backup-restore/pkg/compressor"
brtypes "github.com/gardener/etcd-backup-restore/pkg/types"

"github.com/gardener/etcd-backup-restore/test/utils"
. "github.com/onsi/ginkgo"
Expand Down Expand Up @@ -78,12 +79,12 @@ var _ = SynchronizedBeforeSuite(func() []byte {
ctx := utils.ContextWithWaitGroupFollwedByGracePeriod(populatorCtx, wg, deltaSnapshotPeriod+2*time.Second)

compressionConfig := compressor.NewCompressorConfig()
err = utils.RunSnapshotter(logger, snapstoreDir, deltaSnapshotPeriod, endpoints, ctx.Done(), true, compressionConfig)
snapstoreConfig := brtypes.SnapstoreConfig{Container: snapstoreDir, Provider: "Local"}
err = utils.RunSnapshotter(logger, snapstoreConfig, deltaSnapshotPeriod, endpoints, ctx.Done(), true, compressionConfig)
Expect(err).ShouldNot(HaveOccurred())

keyTo = resp.KeyTo
return data

}, func(data []byte) {})

var _ = SynchronizedAfterSuite(func() {}, cleanUp)
Expand Down
Loading

0 comments on commit bb6dc59

Please sign in to comment.