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

Function TestHashGetall

IceFireDB-PubSub/test/cmd_hash_test.go:218–249  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

216}
217
218func TestHashGetall(t *testing.T) {
219 server.Clear()
220
221 c, err := proto.Dial(server.Addr())
222 ok(t, err)
223 defer c.Close()
224 mustOK(t, c, "HMSET", "wim",
225 "gijs", "lam",
226 "kees", "bok",
227 "teun", "vuur",
228 "zus", "jet")
229
230 mustDo(t, c,
231 "HGETALL", "wim",
232 proto.Strings(
233 "gijs", "lam",
234 "kees", "bok",
235 "teun", "vuur",
236 "zus", "jet",
237 ),
238 )
239
240 mustDo(t, c, "HGETALL", "nosuch",
241 proto.Strings(),
242 )
243
244 // Wrong key type
245 directDoString(t, c, "SET", "foo", "bar")
246 mustDo(t, c, "HGETALL", "foo",
247 proto.Error(msgWrongType),
248 )
249}
250
251func TestHashKeys(t *testing.T) {
252 server.Clear()

Callers

nothing calls this directly

Calls 10

ClearFunction · 0.92
DialFunction · 0.92
AddrFunction · 0.92
StringsFunction · 0.92
ErrorFunction · 0.92
okFunction · 0.70
mustOKFunction · 0.70
mustDoFunction · 0.70
directDoStringFunction · 0.70
CloseMethod · 0.65

Tested by

no test coverage detected