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

Function TestStringPSetEx

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

Source from the content-addressed store, hash-verified

305}
306
307func TestStringPSetEx(t *testing.T) {
308 args := make([]string, 3)
309 key := "psetex"
310 args[0] = key
311 args[1] = "100000"
312 args[2] = value
313
314 ctx := ContextTest("psetex", args...)
315 Call(ctx)
316 assert.Contains(t, ctxString(ctx.Out), "OK")
317 EqualGet(t, key, value, nil)
318
319 args[1] = "x"
320 ctx = ContextTest("psetex", args...)
321 Call(ctx)
322 assert.Contains(t, ctxString(ctx.Out), ErrInteger.Error())
323
324}
325
326func TestStringSetRange(t *testing.T) {
327 args := make([]string, 3)

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