MCPcopy Create free account
hub / github.com/ceph/ceph / TEST_F

Function TEST_F

src/test/cls_lua/test_cls_lua.cc:598–615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

596string ClsLua::pool_name;
597
598TEST_F(ClsLua, Write) {
599 /* write some data into object */
600 string written = "Hello World";
601 bufferlist inbl;
602 encode(written, inbl);
603 ASSERT_EQ(0, clslua_exec(test_script, &inbl, "write"));
604
605 /* have Lua read out of the object */
606 uint64_t size;
607 bufferlist outbl;
608 ASSERT_EQ(0, ioctx.stat(oid, &size, NULL));
609 ASSERT_EQ(size, (uint64_t)ioctx.read(oid, outbl, size, 0) );
610
611 /* compare what Lua read to what we wrote */
612 string read;
613 decode(read, outbl);
614 ASSERT_EQ(read, written);
615}
616
617TEST_F(ClsLua, SyntaxError) {
618 ASSERT_EQ(-EIO, clslua_exec("-"));

Callers

nothing calls this directly

Calls 15

encodeFunction · 0.50
decodeFunction · 0.50
statMethod · 0.45
readMethod · 0.45
appendMethod · 0.45
write_fullMethod · 0.45
c_strMethod · 0.45
lengthMethod · 0.45
strMethod · 0.45
sizeMethod · 0.45
omap_setMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected