Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
CaosDB Python Integration Tests
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
CaosDB Python Integration Tests
Commits
bb7cb3a8
Verified
Commit
bb7cb3a8
authored
Jun 7, 2022
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
MAINT: replace some skips by xfails
parent
dbffde90
No related branches found
No related tags found
2 merge requests
!50
Draft: ENH: file system: core
,
!8
Draft: F filesystem
Pipeline
#23754
failed
Jun 7, 2022
Stage: info
Stage: setup
Stage: cert
Stage: style
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_file.py
+14
-14
14 additions, 14 deletions
tests/test_file.py
with
14 additions
and
14 deletions
tests/test_file.py
+
14
−
14
View file @
bb7cb3a8
...
...
@@ -674,7 +674,6 @@ def test_insert_files_in_dir_regex():
pass
@mark.skip
()
def
test_thumbnails
():
file_
=
models
.
File
(
name
=
"
TestFile
"
,
description
=
"
Testfile Desc
"
,
...
...
@@ -693,6 +692,7 @@ def test_thumbnails():
"
thumbnail
"
)[
-
41
:]
==
"
/Thumbnails/testfiles/thumbnails_test.dat
"
@mark.xfail
(
reason
=
"
Needs file system refactoring
"
)
def
test_auto_create_parent_dirs
():
file_
=
models
.
File
(
name
=
"
TestFile
"
,
path
=
"
A/B/C/test.dat
"
,
...
...
@@ -773,7 +773,7 @@ def test_auto_create_parent_dirs():
assert
file_1
.
get
(
"
url
"
)[
-
26
:]
==
"
/FileSystem/A/B/C/test.dat
"
@mark.
skip
(
)
@mark.
xfail
(
reason
=
"
Needs file system refactoring
"
)
def
test_import_file
():
path
=
get_config
().
get
(
"
IntegrationTests
"
,
"
test_files.test_import_files_in_dir.local
"
)
+
"
testfolder/
"
...
...
@@ -804,7 +804,7 @@ def test_import_file():
pass
@mark.
skip
(
)
@mark.
xfail
(
reason
=
"
Needs file system refactoring
"
)
def
test_import_directoy
():
path
=
get_config
().
get
(
"
IntegrationTests
"
,
"
test_files.test_import_files_in_dir.local
"
)
+
"
testfolder/
"
...
...
@@ -827,6 +827,7 @@ def test_import_directoy():
pass
@mark.xfail
(
reason
=
"
Needs file system refactoring
"
)
def
test_consistency_file_was_modified_2
():
# this test is different from test_consistency_file_was_modified in that
# the server does actually corrupt the file.
...
...
@@ -838,11 +839,10 @@ def test_consistency_file_was_modified_2():
path
=
"
debug/test_file_storage_consistency
"
,
file
=
"
test.dat
"
)
file_
.
insert
()
checksum1
=
file_
.
checksum
print
(
checksum1
)
checksum1
=
file_
.
checksum
.
lower
()
qfile
=
execute_query
(
"
FIND FILE TestConsistency3
"
,
unique
=
True
)
assert
qfile
.
id
==
file_
.
id
assert
qfile
.
checksum
==
checksum1
assert
qfile
.
checksum
.
lower
()
==
checksum1
assert
file_
.
id
is
not
None
assert
file_
.
is_valid
()
...
...
@@ -866,38 +866,38 @@ def test_consistency_file_was_modified_2():
# old checksum is still stored
qfile
=
execute_query
(
"
FIND FILE TestConsistency3
"
,
unique
=
True
)
assert
qfile
.
id
==
file_
.
id
assert
qfile
.
checksum
==
checksum1
assert
qfile
.
checksum
.
lower
()
==
checksum1
# download fails because the checksum changed.
with
raises
(
db
.
exceptions
.
ConsistencyError
)
as
exc
:
file_
.
download
(
target
=
"
test.dat.tmp
"
)
file_
.
download
(
target
=
"
test.dat.tmp
"
,
check_hash
=
False
)
assert
file_
.
checksum
==
checksum1
checksum2
=
db
.
File
.
sha512
(
"
test.dat.tmp
"
)
assert
file_
.
checksum
.
lower
()
==
checksum1
checksum2
=
db
.
File
.
sha512
(
"
test.dat.tmp
"
)
.
lower
()
file_
.
checksum
=
checksum2
assert
checksum2
!=
checksum1
# old checksum is still stored
qfile
=
execute_query
(
"
FIND FILE TestConsistency3
"
,
unique
=
True
)
assert
qfile
.
id
==
file_
.
id
assert
qfile
.
checksum
==
checksum1
assert
qfile
.
checksum
.
lower
()
==
checksum1
# here the client may validate the new file
file_
.
file
=
None
file_
.
update
()
assert
checksum2
==
file_
.
checksum
assert
checksum2
==
file_
.
checksum
.
lower
()
# new checksum is stored
qfile
=
execute_query
(
"
FIND FILE TestConsistency3
"
,
unique
=
True
)
assert
qfile
.
id
==
file_
.
id
assert
qfile
.
checksum
==
checksum2
assert
qfile
.
checksum
.
lower
()
==
checksum2
# no ConsistencyError anymore
file_
.
download
(
target
=
"
test.dat.tmp
"
)
assert
checksum2
==
file_
.
checksum
assert
checksum2
==
file_
.
checksum
.
lower
()
# new checksum is still stored
qfile
=
execute_query
(
"
FIND FILE TestConsistency3
"
,
unique
=
True
)
assert
qfile
.
id
==
file_
.
id
assert
qfile
.
checksum
==
checksum2
assert
qfile
.
checksum
.
lower
()
==
checksum2
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