rotate_test.go
rotate_test.go - Overview
This file contains unit tests for the rotate
command functionality, specifically focusing on key rotation and encryption scenarios within a Badger database.
Detailed Documentation
TestRotate
- Purpose: Tests the key rotation functionality of the
doRotate
function, including scenarios with incorrect keys, proper key rotation, and plaintext rotation. - Parameters:
t
(*testing.T): Testing context provided by the Go testing framework.
- Returns: None
TestRotatePlainTextToEncrypted
- Purpose: Tests the
doRotate
function's ability to enable encryption on a previously unencrypted Badger database. - Parameters:
t
(*testing.T): Testing context provided by the Go testing framework.
- Returns: None
Getting Started Relevance
YES