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
228efafa
Commit
228efafa
authored
6 years ago
by
yvesn
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-7140: fixing tests
parent
faaacfd4
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
obis/src/python/obis/dm/data_mgmt_test.py
+12
-6
12 additions, 6 deletions
obis/src/python/obis/dm/data_mgmt_test.py
obis/src/python/obis/dm/git.py
+1
-1
1 addition, 1 deletion
obis/src/python/obis/dm/git.py
with
13 additions
and
7 deletions
obis/src/python/obis/dm/data_mgmt_test.py
+
12
−
6
View file @
228efafa
...
...
@@ -211,19 +211,19 @@ def test_undo_commit_when_sync_fails(tmpdir):
def
test_init_analysis
(
tmpdir
):
dm
=
shared_dm
(
tmpdir
)
tmp_dir_path
=
str
(
tmpdir
)
with
data_mgmt
.
cd
(
tmp_dir_path
):
dm
=
shared_dm
(
tmp_dir_path
)
prepare_registration_expectations
(
dm
)
openbis
=
dm
.
openbis
result
=
dm
.
init_data
(
tmp_dir_path
,
"
test
"
)
assert
result
.
returncode
==
0
copy_test_data
(
tmpdir
)
dm
=
shared_dm
(
tmp_dir_path
)
prepare_registration_expectations
(
dm
)
set_registration_configuration
(
dm
)
result
=
dm
.
commit
(
"
Added data.
"
)
...
...
@@ -231,11 +231,17 @@ def test_init_analysis(tmpdir):
parent_ds_code
=
dm
.
settings_resolver
.
config_dict
()[
'
repository
'
][
'
data_set_id
'
]
analysis_repo
=
"
analysis
"
result
=
dm
.
init_analysis
(
analysis_repo
,
None
)
assert
result
.
returncode
==
0
os
.
mkdir
(
analysis_repo
)
with
data_mgmt
.
cd
(
analysis_repo
):
dm
=
shared_dm
(
os
.
path
.
join
(
tmpdir
,
analysis_repo
))
dm
.
openbis
=
openbis
prepare_new_data_set_expectations
(
dm
)
result
=
dm
.
init_analysis
(
"
..
"
)
assert
result
.
returncode
==
0
set_registration_configuration
(
dm
)
prepare_new_data_set_expectations
(
dm
)
result
=
dm
.
commit
(
"
Analysis.
"
)
...
...
This diff is collapsed.
Click to expand it.
obis/src/python/obis/dm/git.py
+
1
−
1
View file @
228efafa
...
...
@@ -156,7 +156,7 @@ class GitRepoFileInfo(object):
def
file_list
(
self
):
tree
=
self
.
git_wrapper
.
git_ls_tree
()
if
tree
.
failure
():
if
tree
.
failure
()
or
len
(
tree
.
output
)
==
0
:
return
[]
lines
=
tree
.
output
.
split
(
"
\n
"
)
files
=
[
line
.
split
(
"
\t
"
)[
-
1
].
strip
()
for
line
in
lines
]
...
...
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