Skip to content
Snippets Groups Projects
Commit cc23307f authored by Sergey Yakubov's avatar Sergey Yakubov
Browse files

allow override files

parent b66951ab
No related branches found
No related tags found
No related merge requests found
......@@ -124,7 +124,7 @@ void asapo::SystemIO::CreateNewDirectory(const std::string& directory_name, Erro
Error SystemIO::WriteDataToFile(const std::string& fname, const uint8_t* data, size_t length) const {
Error err;
auto fd = Open(fname, IO_OPEN_MODE_CREATE_AND_FAIL_IF_EXISTS | IO_OPEN_MODE_RW, &err);
auto fd = Open(fname, IO_OPEN_MODE_CREATE | IO_OPEN_MODE_RW, &err);
if (err) {
return err;
}
......
......@@ -32,8 +32,13 @@ database_name=db_test
beamtime_id=asapo_test
beamline=test
receiver_root_folder=/tmp/asapo/receiver/files
receiver_folder=${receiver_root_folder}/${beamline}/${beamtime_id}
Cleanup() {
echo cleanup
rm -rf ${receiver_root_folder}
nomad stop receiver
nomad stop discovery
nomad stop authorizer
......@@ -50,7 +55,7 @@ wait_mongo
echo "db.${beamtime_id}.insert({dummy:1})" | mongo --port 27016 ${beamtime_id}
sed -i 's/27017/27016/g' receiver.json.tpl
sed -i 's/"WriteToDisk":true/"WriteToDisk":false/g' receiver.json.tpl
#sed -i 's/"WriteToDisk":true/"WriteToDisk":false/g' receiver.json.tpl
nomad run authorizer.nmd
......@@ -58,6 +63,9 @@ nomad run nginx.nmd
nomad run receiver.nmd
nomad run discovery.nmd
mkdir -p ${receiver_folder}
sleep 1
nfiles=1000
......
......@@ -15,6 +15,6 @@ set_target_properties(${TARGET_NAME} PROPERTIES LINKER_LANGUAGE CXX)
################################
add_test_setup_cleanup(${TARGET_NAME})
add_integration_test(${TARGET_NAME} writeok "test_file ok dummy" nomem)
add_integration_test(${TARGET_NAME} writetwice "test_file error kFileAlreadyExists:test" nomem)
add_integration_test(${TARGET_NAME} writetwice "test_file ok dummy" nomem)
add_integration_test(${TARGET_NAME} dirnoaccess "test_noaccess/test_file error Permissiondenied:test_noaccess/test_file" nomem)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment