MCPcopy Index your code
hub / github.com/apache/answer / mustSet

Function mustSet

plugin/plugin_test/kv_storage_test.go:40–44  ·  view source on GitHub ↗

Helper functions for testing

(t *testing.T, kv *plugin.KVOperator, ctx context.Context, group, key, value string)

Source from the content-addressed store, hash-verified

38
39// Helper functions for testing
40func mustSet(t *testing.T, kv *plugin.KVOperator, ctx context.Context, group, key, value string) {
41 if err := kv.Set(ctx, plugin.KVParams{Group: group, Key: key, Value: value}); err != nil {
42 t.Fatalf("Failed to set %s/%s: %v", group, key, err)
43 }
44}
45
46func mustGet(t *testing.T, kv *plugin.KVOperator, ctx context.Context, group, key, expected string) {
47 val, err := kv.Get(ctx, plugin.KVParams{Group: group, Key: key})

Callers 3

TestBasicOperationsFunction · 0.85
TestPaginationFunction · 0.85
TestConcurrencyFunction · 0.85

Calls 1

SetMethod · 0.80

Tested by

no test coverage detected