fuse unit tests and fixes
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
This commit is contained in:
parent
1ab36272f6
commit
b1735ab0af
@ -26,6 +26,16 @@
|
|||||||
namespace repertory {
|
namespace repertory {
|
||||||
TYPED_TEST_CASE(fuse_test, fuse_provider_types);
|
TYPED_TEST_CASE(fuse_test, fuse_provider_types);
|
||||||
|
|
||||||
|
TYPED_TEST(fuse_test, chmod_can_not_chmod_set_sticky_if_not_root) {
|
||||||
|
std::string file_name{"chmod_test"};
|
||||||
|
auto file_path = this->create_file_and_test(file_name);
|
||||||
|
|
||||||
|
EXPECT_EQ(-1, chmod(file_path.c_str(), S_IRUSR | S_IWUSR | S_ISVTX));
|
||||||
|
EXPECT_EQ(EPERM, errno);
|
||||||
|
|
||||||
|
this->unlink_file_and_test(file_path);
|
||||||
|
}
|
||||||
|
|
||||||
TYPED_TEST(fuse_test, chmod_can_chmod_if_owner) {
|
TYPED_TEST(fuse_test, chmod_can_chmod_if_owner) {
|
||||||
std::string file_name{"chmod_test"};
|
std::string file_name{"chmod_test"};
|
||||||
auto file_path = this->create_file_and_test(file_name);
|
auto file_path = this->create_file_and_test(file_name);
|
||||||
|
@ -26,16 +26,6 @@
|
|||||||
namespace repertory {
|
namespace repertory {
|
||||||
TYPED_TEST_CASE(fuse_test, fuse_provider_types);
|
TYPED_TEST_CASE(fuse_test, fuse_provider_types);
|
||||||
|
|
||||||
TYPED_TEST(fuse_test, chown_can_not_chmod_set_sticky_if_not_root) {
|
|
||||||
std::string file_name{"chown_test"};
|
|
||||||
auto file_path = this->create_file_and_test(file_name);
|
|
||||||
|
|
||||||
EXPECT_EQ(-1, chmod(file_path.c_str(), S_IRUSR | S_IWUSR | S_ISVTX));
|
|
||||||
EXPECT_EQ(EPERM, errno);
|
|
||||||
|
|
||||||
this->unlink_file_and_test(file_path);
|
|
||||||
}
|
|
||||||
|
|
||||||
TYPED_TEST(fuse_test,
|
TYPED_TEST(fuse_test,
|
||||||
chown_can_chown_group_if_owner_and_a_member_of_the_group) {
|
chown_can_chown_group_if_owner_and_a_member_of_the_group) {
|
||||||
std::string file_name{"chown_test"};
|
std::string file_name{"chown_test"};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user