testfixtures

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package testfixtures contains shared compatibility payloads used by tests in multiple packages. Keeping these fixtures centralized helps each layer prove the same Chef-facing contract instead of inventing similar-but-different data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneDataBagPayload

func CloneDataBagPayload(payload map[string]any) map[string]any

CloneDataBagPayload returns a deep copy of a fixture payload so tests can mutate payloads without coupling later assertions to shared map state.

func EncryptedDataBagItem

func EncryptedDataBagItem() map[string]any

EncryptedDataBagItem returns a canonical encrypted-looking data bag item. The values are deterministic fake ciphertexts; tests use them to prove server opacity and JSON preservation, not cryptographic correctness.

func EncryptedDataBagItemID

func EncryptedDataBagItemID() string

EncryptedDataBagItemID returns the canonical encrypted-looking item ID used by the shared encrypted data bag fixture.

func EncryptedDataBagName

func EncryptedDataBagName() string

EncryptedDataBagName returns the shared data bag name used by encrypted data bag compatibility tests across API, persistence, search, and functional layers.

func NestedEncryptedDataBagItem

func NestedEncryptedDataBagItem() map[string]any

NestedEncryptedDataBagItem returns an encrypted-looking item with arrays, nested envelopes, booleans, numbers, and nulls so persistence and response tests can catch accidental flattening or type loss.

func OrdinaryDataBagItem

func OrdinaryDataBagItem() map[string]any

OrdinaryDataBagItem returns a plain data bag item that documents the baseline OpenCook data bag contract before encrypted-looking envelopes are layered on.

func UpdatedEncryptedDataBagItem

func UpdatedEncryptedDataBagItem() map[string]any

UpdatedEncryptedDataBagItem returns the canonical update payload for the encrypted data bag fixture. The body intentionally omits an id so tests can pin Chef-compatible URL-derived item ID behavior on PUT.

Types

This section is empty.

Jump to

Keyboard shortcuts

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