MCPcopy Create free account
hub / github.com/clouditor/clouditor / StorageWithError

Struct StorageWithError

internal/testutil/storage.go:28–38  ·  view source on GitHub ↗

StorageWithError can be used to introduce various errors in a storage operation during unit testing.

Source from the content-addressed store, hash-verified

26
27// StorageWithError can be used to introduce various errors in a storage operation during unit testing.
28type StorageWithError struct {
29 CreateErr error
30 SaveErr error
31 UpdateErr error
32 GetErr error
33 ListErr error
34 RawErr error
35 CountRes int64
36 CountErr error
37 DeleteErr error
38}
39
40func (s *StorageWithError) Create(_ any) error { return s.CreateErr }
41func (s *StorageWithError) Save(_ any, _ ...any) error { return s.SaveErr }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected