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 ¶
- func CloneDataBagPayload(payload map[string]any) map[string]any
- func EncryptedDataBagItem() map[string]any
- func EncryptedDataBagItemID() string
- func EncryptedDataBagName() string
- func NestedEncryptedDataBagItem() map[string]any
- func OrdinaryDataBagItem() map[string]any
- func UpdatedEncryptedDataBagItem() map[string]any
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloneDataBagPayload ¶
CloneDataBagPayload returns a deep copy of a fixture payload so tests can mutate payloads without coupling later assertions to shared map state.
func EncryptedDataBagItem ¶
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 ¶
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 ¶
OrdinaryDataBagItem returns a plain data bag item that documents the baseline OpenCook data bag contract before encrypted-looking envelopes are layered on.
func UpdatedEncryptedDataBagItem ¶
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.