Skip to content
Snippets Groups Projects
Commit fff3bce1 authored by Henry Luetcke's avatar Henry Luetcke Committed by Adam Laskowski
Browse files

add break in teardown for manual emptying of trashcan

parent 570a6f64
No related branches found
No related tags found
1 merge request!40SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
function pass = obi_test(varargin) function obi_test(varargin)
%obi_test Testing function for the Matlab openBIS Toolbox %obi_test Testing function for the Matlab openBIS Toolbox
% This function runs a few tests for the Matlab openBIS Toolbox. It % This function runs a few tests for the Matlab openBIS Toolbox. It
% returns true if all the tests pass successfully and fasle otherwise. % returns true if all the tests pass successfully and fasle otherwise.
% Input argumtents (all optional): % Input argumtents (all optional):
% teardown ... delete everything at the end (true) % teardown ... delete everything at the end (true)
pass = true;
if nargin == 1 if nargin == 1
teardown = varargin{1}; teardown = varargin{1};
...@@ -101,6 +100,11 @@ end ...@@ -101,6 +100,11 @@ end
%% 7. Tear-down (delete everything, optional) %% 7. Tear-down (delete everything, optional)
% Note: it is currently not possible to delete all openBIS automatically.
% The reason is that pyBIS can only delete experiments / datasets by moving
% them to the openBIS trashcan. Emptying the trashcan can only be done
% manually. As long as the experiment is still in the trashscan, the
% corresponding project and space cannot be deleted.
if teardown if teardown
fprintf('\n\n%s - Starting tear-down', datestr(clock,31)) fprintf('\n\n%s - Starting tear-down', datestr(clock,31))
% delete the created local files % delete the created local files
...@@ -111,6 +115,9 @@ if teardown ...@@ -111,6 +115,9 @@ if teardown
obi.delete_experiment(exp, 'created by Matlab-openBIS toolbox test function'); obi.delete_experiment(exp, 'created by Matlab-openBIS toolbox test function');
fprintf('\n%s - Successfully deleted Experiment %s\n', datestr(clock,31), exp_name) fprintf('\n%s - Successfully deleted Experiment %s\n', datestr(clock,31), exp_name)
fprintf('\n\nPlease empty experiment %s manually from the openBIS trashcan, then press any key to continue.\n', exp_name)
pause()
% delete openBIS project % delete openBIS project
obi.delete_project(project_name, 'created by Matlab-openBIS toolbox test function'); obi.delete_project(project_name, 'created by Matlab-openBIS toolbox test function');
fprintf('\n%s - Successfully deleted Project %s\n', datestr(clock,31), project_name) fprintf('\n%s - Successfully deleted Project %s\n', datestr(clock,31), project_name)
......
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