package snapshots
import "github.com/hashicorp/vault/sdk/helper/testhelpers/snapshots"
Index ¶
- type SnapshotTestCase
- func NewSnapshotTestCase(t testing.TB, backend logical.Backend) *SnapshotTestCase
- func (s *SnapshotTestCase) DoRecover(t testing.TB, path string) (*logical.Response, error)
- func (s *SnapshotTestCase) RegularStorage() logical.Storage
- func (s *SnapshotTestCase) RunList(t testing.TB, path string)
- func (s *SnapshotTestCase) RunRead(t testing.TB, path string)
- func (s *SnapshotTestCase) SnapshotStorage() logical.Storage
Types ¶
type SnapshotTestCase ¶
type SnapshotTestCase struct {
// contains filtered or unexported fields
}
func NewSnapshotTestCase ¶
func NewSnapshotTestCase(t testing.TB, backend logical.Backend) *SnapshotTestCase
NewSnapshotTestCase is used to create a snapshot test case for a particular backend. The test case is used to ensure that the backend behaves correctly when it receives snapshot operations, without having to do the end-to-end setup of creating a raft cluster, taking a snapshot, and loading it.
func (*SnapshotTestCase) DoRecover ¶
DoRecover performs a read operation from a snapshot, and then a recover. The test returns the results of the recover operation
func (*SnapshotTestCase) RegularStorage ¶
func (s *SnapshotTestCase) RegularStorage() logical.Storage
func (*SnapshotTestCase) RunList ¶
func (s *SnapshotTestCase) RunList(t testing.TB, path string)
RunList runs a list operation without a snapshot, a list operation from a snapshot, and then another list operation without a snapshot. The test verifies that the list operation from the snapshot does not cause the results to change
func (*SnapshotTestCase) RunRead ¶
func (s *SnapshotTestCase) RunRead(t testing.TB, path string)
RunRead runs a read operation without a snapshot, a read operation from a snapshot, and then another read operation without a snapshot. The test verifies that the read operation from the snapshot does not cause the results to change
func (*SnapshotTestCase) SnapshotStorage ¶
func (s *SnapshotTestCase) SnapshotStorage() logical.Storage
Source Files ¶
- Version
- v0.18.0 (latest)
- Published
- Jun 5, 2025
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 1 month ago –
Tools for package owners.