MCPcopy Create free account
hub / github.com/distributedio/titan / TestStringSetEx

Function TestStringSetEx

command/strings_test.go:271–287  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

269}
270
271func TestStringSetEx(t *testing.T) {
272 args := make([]string, 3)
273 key := "setex"
274 args[0] = key
275 args[1] = "10000"
276 args[2] = value
277
278 ctx := ContextTest("setex", args...)
279 Call(ctx)
280 assert.Contains(t, ctxString(ctx.Out), "OK")
281 EqualGet(t, key, value, nil)
282
283 args[1] = "x"
284 ctx = ContextTest("setex", args...)
285 Call(ctx)
286 assert.Contains(t, ctxString(ctx.Out), ErrInteger.Error())
287}
288
289func TestStringSetNx(t *testing.T) {
290 args := make([]string, 2)

Callers

nothing calls this directly

Calls 5

ContextTestFunction · 0.85
CallFunction · 0.85
ctxStringFunction · 0.85
EqualGetFunction · 0.85
ErrorMethod · 0.65

Tested by

no test coverage detected