Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
d3cce122
Commit
d3cce122
authored
12 years ago
by
felmer
Browse files
Options
Downloads
Patches
Plain Diff
integration tests: fixing test-3v.sh
SVN: 26765
parent
bc9776e1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
integration-tests/common.bash
+2
-2
2 additions, 2 deletions
integration-tests/common.bash
integration-tests/test-3v.sh
+26
-34
26 additions, 34 deletions
integration-tests/test-3v.sh
with
28 additions
and
36 deletions
integration-tests/common.bash
+
2
−
2
View file @
d3cce122
...
@@ -335,12 +335,12 @@ function fetch_latest_artifacts_from_cruise_control {
...
@@ -335,12 +335,12 @@ function fetch_latest_artifacts_from_cruise_control {
local
last_build
=
"
$HUDSON_ARTIFACTS
/
$proj_name
/lastSuccessful/archive/_main/targets/dist"
local
last_build
=
"
$HUDSON_ARTIFACTS
/
$proj_name
/lastSuccessful/archive/_main/targets/dist"
if
[
-n
"
$MY_HOST_IP
"
-a
"
$MY_HOST_IP
"
==
"
$CI_HOST_IP
"
]
;
then
if
[
-n
"
$MY_HOST_IP
"
-a
"
$MY_HOST_IP
"
==
"
$CI_HOST_IP
"
]
;
then
local
last
=
`
ls
$CI_HOME
/
$last_build
/
*
.zip
`
local
last
=
`
ls
$CI_HOME
/
$last_build
/
*
.zip
`
echo
"Fetching artifacts locally from project '
$proj_name
':
\n
$last
"
echo
"Fetching artifacts locally from project '
$proj_name
':
$last
"
cp
$CI_HOME
/
$last_build
/
*
.zip
$dest_dir
cp
$CI_HOME
/
$last_build
/
*
.zip
$dest_dir
else
else
local
list_cmd
=
"ls
$last_build
/*.zip"
local
list_cmd
=
"ls
$last_build
/*.zip"
local
last
=
`
echo
$list_cmd
| ssh
$SSH_CRUISE_CONTROL_NAME
-T
`
local
last
=
`
echo
$list_cmd
| ssh
$SSH_CRUISE_CONTROL_NAME
-T
`
echo
"Fetching artifacts remotely from project '
$proj_name
':
\n
$last
"
echo
"Fetching artifacts remotely from project '
$proj_name
':
$last
"
scp
$SSH_CRUISE_CONTROL_NAME
:
$last_build
/
*
.zip
$dest_dir
scp
$SSH_CRUISE_CONTROL_NAME
:
$last_build
/
*
.zip
$dest_dir
fi
fi
}
}
...
...
This diff is collapsed.
Click to expand it.
integration-tests/test-3v.sh
+
26
−
34
View file @
d3cce122
...
@@ -38,7 +38,7 @@ function generate_test_data {
...
@@ -38,7 +38,7 @@ function generate_test_data {
echo
Generate incoming data
echo
Generate incoming data
local
DIR
=
$DATA
/in-raw
local
DIR
=
$DATA
/in-raw
# drop an identif
y
able valid data set
# drop an identif
i
able valid data set
copy_test_data 3VCP1
$DIR
copy_test_data 3VCP1
$DIR
sleep
30
sleep
30
...
@@ -46,21 +46,14 @@ function generate_test_data {
...
@@ -46,21 +46,14 @@ function generate_test_data {
copy_test_data 3VCP1
$DIR
copy_test_data 3VCP1
$DIR
sleep
30
sleep
30
# drop an identif
y
able
in
valid data set
(wrong image name, missing plate)
# drop an
other
identif
i
able valid data set
copy_test_data 3VCP3
$DIR
copy_test_data 3VCP3
$DIR
sleep
30
sleep
30
# drop an unidentif
y
able data set
# drop an unidentif
i
able data set
copy_test_data UnknownPlate
$DIR
copy_test_data UnknownPlate
$DIR
sleep
30
sleep
30
# drop 3VCP1 again but this time it is a valid data set
copy_test_data 3VCP3
$DATA
mv
$DATA
/3VCP3/TIFF/blabla_3VCP1_K13_8_w460.tif
$DATA
/3VCP3/TIFF/blabla_3VCP3_K13_8_w460.tif
echo
image
for
well M03
>
$DATA
/3VCP3/TIFF/blabla_3VCP3_M03_2_w350.tif
mv
$DATA
/3VCP3
$DIR
sleep
30
# register not at a sample but at an experiment and two data set parents
# register not at a sample but at an experiment and two data set parents
echo
hello world
>
$DATA
/incoming-a/nemo.exp1_MICROX-3VCP1.MICROX-3VCP3.txt
echo
hello world
>
$DATA
/incoming-a/nemo.exp1_MICROX-3VCP1.MICROX-3VCP3.txt
# give the DSS some time to process the above request
# give the DSS some time to process the above request
...
@@ -99,17 +92,17 @@ function launch_tests {
...
@@ -99,17 +92,17 @@ function launch_tests {
}
}
function
find_dataset_dir
{
function
find_dataset_dir
{
local
pattern
=
$1
local
pattern
=
$1
local dir
=
`
find
$DATA
/main-store/1/E96C8910-596A-409D-BDA4-BBD3FE6629A7
-type
d |
grep
"
$pattern
"
`
local dir
=
`
find
$DATA
/main-store/1/E96C8910-596A-409D-BDA4-BBD3FE6629A7
-type
d |
grep
"
$pattern
"
`
if
[
"
$dir
"
!=
""
]
;
then
if
[
"
$dir
"
!=
""
]
;
then
if
[
!
-d
"
$dir
"
]
;
then
if
[
!
-d
"
$dir
"
]
;
then
report_error Directory
\"
$dir
\"
does not exist!
report_error Directory
\"
$dir
\"
does not exist!
else
else
echo
$dir
echo
$dir
return
return
fi
fi
fi
fi
report_error
"
$DATA
/main-store/1/
identified
does not contain a directory matching
$pattern
:
$dir
"
report_error
"
$DATA
/main-store/1/
E96C8910-596A-409D-BDA4-BBD3FE6629A7
does not contain a directory matching
$pattern
:
$dir
"
}
}
function
assert_empty_in_out_folders
{
function
assert_empty_in_out_folders
{
...
@@ -169,25 +162,24 @@ function assert_correct_content {
...
@@ -169,25 +162,24 @@ function assert_correct_content {
assert_empty_in_out_folders
assert_empty_in_out_folders
assert_dir_exists
$DATA
/out-raw/microX_200801011213_3VCP1/TIFF
assert_dir_exists
$DATA
/out-raw/microX_200801011213_3VCP1/TIFF
assert_pattern_present
$DATA
/out-raw/.faulty_paths 1
".*data/out-raw/.MARKER_is_finished_microX_200801011213_3VCP1"
assert_pattern_present
$DATA
/out-raw/.faulty_paths 1
".*data/out-raw/.MARKER_is_finished_microX_200801011213_3VCP1"
assert_pattern_present
$WORK
/datamover-raw/data-completed-info.txt
4
"Data complete.*3VCP[0-9]"
assert_pattern_present
$WORK
/datamover-raw/data-completed-info.txt
3
"Data complete.*3VCP[0-9]"
assert_correct_content_of_plate_3VCP1_in_store
assert_correct_content_of_plate_3VCP1_in_store
assert_correct_content_of_image_analysis_data 3VCP1
".*-2
2
.*3VCP1$"
assert_correct_content_of_image_analysis_data 3VCP1
".*-2
4
.*3VCP1$"
assert_correct_content_of_image_analysis_data 3VCP3
".*-2
4
.*3VCP3$"
assert_correct_content_of_image_analysis_data 3VCP3
".*-2
6
.*3VCP3$"
assert_correct_content_of_unidentified_plate_in_store UnknownPlate
assert_correct_content_of_unidentified_plate_in_store UnknownPlate
local
file
=
`
find_dataset_dir
".*-2
7
$"
`
/original/nemo.exp1_MICROX-3VCP1.MICROX-3VCP3.txt
local
file
=
`
find_dataset_dir
".*-2
8
$"
`
/original/nemo.exp1_MICROX-3VCP1.MICROX-3VCP3.txt
assert_equals_as_in_file
"hello world"
$file
assert_equals_as_in_file
"hello world"
$file
# result set columns are
# result set columns are
# id;experiment_code;data_store_code;code;is_placeholder;data_id_parent;is_complete;data_producer_code;production_timestamp
# id;experiment_code;data_store_code;code;is_placeholder;data_id_parent;is_complete;data_producer_code;production_timestamp
assert_correct_dataset_content_in_database 2
"2;EXP1;DSS1;MICROX-3VCP1;f;;U;microX;2008-01-01.*"
assert_correct_dataset_content_in_database 2
"2;EXP1;DSS1;MICROX-3VCP1;f;;U;microX;2008-01-01.*"
assert_correct_dataset_content_in_database 3
"3;EXP1;DSS1;20[0-9]*-2
2
;f;;U;;"
assert_correct_dataset_content_in_database 3
"3;EXP1;DSS1;20[0-9]*-2
4
;f;;U;;"
assert_correct_dataset_content_in_database 4
"4;EXP1;DSS1;20[0-9]*-2
3
;f;;U;;"
assert_correct_dataset_content_in_database 4
"4;EXP1;DSS1;20[0-9]*-2
5
;f;;U;;"
assert_correct_dataset_content_in_database 5
"5;EXP1;DSS1;MICROX-3VCP3;f;;U;microX;2008-01-01.*"
assert_correct_dataset_content_in_database 5
"5;EXP1;DSS1;MICROX-3VCP3;f;;U;microX;2008-01-01.*"
assert_correct_dataset_content_in_database 6
"6;EXP1;DSS1;20[0-9]*-24;f;;U;;"
assert_correct_dataset_content_in_database 6
"6;EXP1;DSS1;20[0-9]*-26;f;;U;;"
assert_correct_dataset_content_in_database 7
"7;EXP1;DSS1;20[0-9]*-26;f;;U;;"
assert_correct_dataset_content_in_database 7
".*7;EXP1;DSS2;20[0-9]*-28;f;2;U;;.*"
assert_correct_dataset_content_in_database 8
".*8;EXP1;DSS2;20[0-9]*-27;f;2;U;;.*"
assert_correct_dataset_content_in_database 7
".*7;EXP1;DSS2;20[0-9]*-28;f;5;U;;.*"
assert_correct_dataset_content_in_database 8
".*8;EXP1;DSS2;20[0-9]*-27;f;5;U;;.*"
assert_equals
"Content of file in drop box1"
"hello world"
"
`
cat
$DATA
/drop-box1/nemo.exp1_MICROX-3VCP1.MICROX-3VCP3
*
-28
.txt
`
"
assert_equals
"Content of file in drop box1"
"hello world"
"
`
cat
$DATA
/drop-box1/nemo.exp1_MICROX-3VCP1.MICROX-3VCP3
*
-27
.txt
`
"
assert_equals
"Content of file in drop box2"
"hello world"
"
`
cat
$DATA
/drop-box2/nemo.exp1_MICROX-3VCP1.MICROX-3VCP3
*
-28
.txt
`
"
assert_equals
"Content of file in drop box2"
"hello world"
"
`
cat
$DATA
/drop-box2/nemo.exp1_MICROX-3VCP1.MICROX-3VCP3
*
-27
.txt
`
"
}
}
function
print_help
{
function
print_help
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment