(t *testing.T, kv *plugin.KVOperator, ctx context.Context, group, key, expected string)
| 44 | } |
| 45 | |
| 46 | func 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}) |
| 48 | if err != nil { |
| 49 | t.Fatalf("Failed to get %s/%s: %v", group, key, err) |
| 50 | } |
| 51 | if val != expected { |
| 52 | t.Errorf("Expected '%s' for %s/%s, got '%s'", expected, group, key, val) |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | func mustDel(t *testing.T, kv *plugin.KVOperator, ctx context.Context, group, key string) { |
| 57 | if err := kv.Del(ctx, plugin.KVParams{Group: group, Key: key}); err != nil { |
no test coverage detected