Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
CaosDB Crawler
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
CaosDB Crawler
Commits
4495790b
Commit
4495790b
authored
2 years ago
by
florian
Browse files
Options
Downloads
Patches
Plain Diff
TST: Fix integration test
parent
04ade76d
No related branches found
No related tags found
2 merge requests
!123
REL: Release v0.6.0
,
!107
ENH: setup logging and reporting for serverside execution
Pipeline
#35052
canceled
2 years ago
Stage: info
Stage: setup
Stage: cert
Stage: style
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
integrationtests/test_use_case_simple_presentation.py
+13
-11
13 additions, 11 deletions
integrationtests/test_use_case_simple_presentation.py
with
13 additions
and
11 deletions
integrationtests/test_use_case_simple_presentation.py
+
13
−
11
View file @
4495790b
...
...
@@ -22,6 +22,7 @@
# ** end header
#
import
logging
import
os
import
pytest
from
subprocess
import
run
...
...
@@ -38,7 +39,7 @@ DATADIR = os.path.join(os.path.dirname(__file__), "test_data",
"
extroot
"
,
"
use_case_simple_presentation
"
)
def
test_complete_crawler
(
clear_database
):
def
test_complete_crawler
(
clear_database
,
caplog
):
# Setup the data model:
model
=
parser
.
parse_model_from_yaml
(
os
.
path
.
join
(
DATADIR
,
"
model.yml
"
))
model
.
sync_data_model
(
noquestion
=
True
,
verbose
=
False
)
...
...
@@ -56,16 +57,17 @@ def test_complete_crawler(clear_database):
forceAllowSymlinks
=
False
)
# test that a bad value for "remove_prefix" leads to runtime error
with
pytest
.
raises
(
RuntimeError
)
as
re
:
crawler_main
(
crawled_directory_path
=
os
.
path
.
join
(
DATADIR
),
cfood_file_name
=
os
.
path
.
join
(
DATADIR
,
"
cfood.yml
"
),
identifiables_definition_file
=
os
.
path
.
join
(
DATADIR
,
"
identifiables.yml
"
),
provenance_file
=
os
.
path
.
join
(
DATADIR
,
"
provenance.yml
"
),
dry_run
=
False
,
remove_prefix
=
"
sldkfjsldf
"
,
)
assert
"
path does not start with the prefix
"
in
str
(
re
.
value
)
caplog
.
set_level
(
logging
.
DEBUG
,
logger
=
"
caoscrawler.crawl
"
)
assert
1
=
crawler_main
(
crawled_directory_path
=
os
.
path
.
join
(
DATADIR
),
cfood_file_name
=
os
.
path
.
join
(
DATADIR
,
"
cfood.yml
"
),
identifiables_definition_file
=
os
.
path
.
join
(
DATADIR
,
"
identifiables.yml
"
),
provenance_file
=
os
.
path
.
join
(
DATADIR
,
"
provenance.yml
"
),
dry_run
=
False
,
remove_prefix
=
"
sldkfjsldf
"
,
)
assert
"
path does not start with the prefix
"
in
caplog
.
text
caplog
.
clear
()
crawler_main
(
crawled_directory_path
=
os
.
path
.
join
(
DATADIR
),
...
...
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