MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / TestMget

Function TestMget

IceFireDB-PubSub/test/cmd_string_test.go:230–255  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

228}
229
230func TestMget(t *testing.T) {
231 server.Clear()
232 c, err := proto.Dial(server.Addr())
233 ok(t, err)
234 defer c.Close()
235 s := server.Direct()
236
237 s.Set("zus", "jet")
238 s.Set("teun", "vuur")
239 s.Set("gijs", "lam")
240 s.Set("kees", "bok")
241
242 mustDo(t, c,
243 "MGET", "zus", "nosuch", "kees",
244 proto.Array(proto.String("jet"), proto.Nil, proto.String("bok")),
245 )
246
247 // Wrong key type returns nil
248 {
249 s.HSet("aap", "foo", "bar")
250 mustDo(t, c,
251 "MGET", "aap",
252 proto.Array(proto.Nil),
253 )
254 }
255}
256
257func TestMset(t *testing.T) {
258 server.Clear()

Callers

nothing calls this directly

Calls 10

ClearFunction · 0.92
DialFunction · 0.92
AddrFunction · 0.92
DirectFunction · 0.92
ArrayFunction · 0.92
StringFunction · 0.92
SetMethod · 0.80
okFunction · 0.70
mustDoFunction · 0.70
CloseMethod · 0.65

Tested by

no test coverage detected