Commit c2a83282 authored by Eric Cano's avatar Eric Cano
Browse files

Fixed missing CTAMode extended parameter creation during directory creations in MockRemoteNS.

parent 8cfa68cc
......@@ -468,7 +468,7 @@ void cta::MockNameServer::createDir(const SecurityIdentity &requester,
const std::string inheritedStorageClass = getDirStorageClass(requester,
enclosingPath);
const std::string fsPath = m_fsDir + path;
if(mkdir(fsPath.c_str(), mode)) {
if(mkdir(fsPath.c_str(), 0755)) {
const int savedErrno = errno;
std::ostringstream msg;
msg << __FUNCTION__ << " - mkdir " << fsPath << " error. Reason: \n" <<
......@@ -481,6 +481,9 @@ void cta::MockNameServer::createDir(const SecurityIdentity &requester,
std::stringstream fileIDString;
fileIDString << ++m_fileIdCounter;
Utils::setXattr(fsPath.c_str(), "user.CTAFileID", fileIDString.str());
std::stringstream modeString;
modeString << std::oct << mode;
Utils::setXattr(fsPath.c_str(), "user.CTAMode", modeString.str());
}
//------------------------------------------------------------------------------
......
......@@ -1084,7 +1084,7 @@ TEST_P(SchedulerTest, createDir_top_level) {
ArchiveDirIterator itor;
ASSERT_NO_THROW(itor = scheduler.getDirContents(s_userOnUserHost, "/"));
/*ASSERT_NO_THROW*/(itor = scheduler.getDirContents(s_userOnUserHost, "/"));
ASSERT_TRUE(itor.hasMore());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment