providertest

package
v1.0.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package providertest provides shared test helpers for encryption.Provider implementations. It eliminates duplication of common contract tests across provider packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertCloseBlocksAllOperations

func AssertCloseBlocksAllOperations(t *testing.T, p encryption.Provider)

AssertCloseBlocksAllOperations verifies that after Close(), all Provider methods return ErrProviderClosed.

func AssertDecryptDataKeyError

func AssertDecryptDataKeyError(t *testing.T, p encryption.Provider, keyID string)

AssertDecryptDataKeyError verifies that DecryptDataKey returns ErrDecryptionFailed.

func AssertDecryptError

func AssertDecryptError(t *testing.T, p encryption.Provider, keyID string)

AssertDecryptError verifies that Decrypt returns ErrDecryptionFailed.

func AssertEncryptError

func AssertEncryptError(t *testing.T, p encryption.Provider, keyID string)

AssertEncryptError verifies that Encrypt returns ErrEncryptionFailed.

func AssertGenerateDataKeyBasics

func AssertGenerateDataKeyBasics(t *testing.T, p encryption.Provider, keyID string) *encryption.DataKey

AssertGenerateDataKeyBasics verifies GenerateDataKey returns a valid DataKey with 32-byte plaintext, non-empty ciphertext, and the correct key ID.

func AssertGenerateDataKeyError

func AssertGenerateDataKeyError(t *testing.T, p encryption.Provider, keyID string)

AssertGenerateDataKeyError verifies that GenerateDataKey returns ErrEncryptionFailed.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL