diff options
author | Matt Benjamin <mbenjamin@redhat.com> | 2020-11-16 22:01:28 +0100 |
---|---|---|
committer | Matt Benjamin <mbenjamin@redhat.com> | 2020-12-16 16:41:27 +0100 |
commit | 3fccec41f682fea72588d4ce35e1d5947a90a9b2 (patch) | |
tree | 59c417dbbd6b1490b387b507c3413f8886228247 /src/test/librgw_file_gp.cc | |
parent | rgw_file: fix zipper crash(es) in RGWCopyObj (diff) | |
download | ceph-3fccec41f682fea72588d4ce35e1d5947a90a9b2.tar.xz ceph-3fccec41f682fea72588d4ce35e1d5947a90a9b2.zip |
rgw_file: fix librgw_file_gp unit test and driver
Fixes missing commit after rgw_write(), as well as conditional
cleanup.
Reorder tests, and split out librgw_file_gp --delete to avoid an
issue w/sysobj cache (temporary).
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Diffstat (limited to 'src/test/librgw_file_gp.cc')
-rw-r--r-- | src/test/librgw_file_gp.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/librgw_file_gp.cc b/src/test/librgw_file_gp.cc index b1bd931f170..c274a82706f 100644 --- a/src/test/librgw_file_gp.cc +++ b/src/test/librgw_file_gp.cc @@ -243,6 +243,9 @@ TEST(LibRGW, PUT_OBJECT) { (void*) data.c_str(), RGW_WRITE_FLAG_NONE); ASSERT_EQ(ret, 0); ASSERT_EQ(nbytes, data.length()); + /* commit write transaction */ + ret = rgw_close(fs, object_fh, 0 /* flags */); + ASSERT_EQ(ret, 0); } } @@ -371,6 +374,14 @@ TEST(LibRGW, DELETE_OBJECT) { } } +TEST(LibRGW, DELETE_BUCKET) { + if (do_delete) { + int ret = rgw_unlink(fs, fs->root_fh, bucket_name.c_str(), + RGW_UNLINK_FLAG_NONE); + ASSERT_EQ(ret, 0); + } +} + TEST(LibRGW, CLEANUP) { if (do_readv) { // release resources |