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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
CaosDB Python Integration Tests
Commits
7b54ca56
Verified
Commit
7b54ca56
authored
3 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
TST: add tests for
caosdb-server#183
parent
1c7005d3
No related branches found
No related tags found
1 merge request
!20
TST: add tests for caosdb-server#183
Pipeline
#14315
failed
3 years ago
Stage: setup
Stage: cert
Stage: style
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.docker/Dockerfile
+2
-2
2 additions, 2 deletions
.docker/Dockerfile
.gitlab-ci.yml
+1
-5
1 addition, 5 deletions
.gitlab-ci.yml
tests/test_issues_server.py
+16
-0
16 additions, 0 deletions
tests/test_issues_server.py
with
19 additions
and
7 deletions
.docker/Dockerfile
+
2
−
2
View file @
7b54ca56
...
...
@@ -10,9 +10,9 @@ RUN apt-get update && \
-y
COPY
.docker/wait-for-it.sh /wait-for-it.sh
ARG
PYLIB=dev
ADD
https://gitlab.com/api/v4/projects/
13656
97
3
/repository/commits/${PYLIB} \
ADD
https://gitlab.
indiscale.
com/api/v4/projects/97/repository/commits/${PYLIB} \
pylib_version.json
RUN
git clone https://gitlab.com/caosdb/caosdb-pylib.git
&&
\
RUN
git clone https://gitlab.
indiscale.
com/caosdb/caosdb-pylib.git
&&
\
cd
caosdb-pylib
&&
git checkout
${
PYLIB
}
&&
pip3
install
.
COPY
. /git
...
...
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
1
−
5
View file @
7b54ca56
...
...
@@ -158,10 +158,6 @@ build-testenv:
image
:
docker:19.03
stage
:
setup
timeout
:
2h
only
:
-
schedules
-
web
-
pushes
needs
:
[]
script
:
-
df -h
...
...
@@ -169,7 +165,7 @@ build-testenv:
-
if [ -z "$PYLIB" ]; then
if echo "$CI_COMMIT_REF_NAME" | grep -c "^f-" ; then
echo "Check if pylib has branch $CI_COMMIT_REF_NAME" ;
if wget https://gitlab.com/api/v4/projects/
13656
97
3
/repository/branches/${CI_COMMIT_REF_NAME} ; then
if wget https://gitlab.
indiscale.
com/api/v4/projects/97/repository/branches/${CI_COMMIT_REF_NAME} ; then
PYLIB=$CI_COMMIT_REF_NAME ;
fi;
fi;
...
...
This diff is collapsed.
Click to expand it.
tests/test_issues_server.py
+
16
−
0
View file @
7b54ca56
...
...
@@ -435,3 +435,19 @@ def test_issue_170():
p2
=
db
.
execute_query
(
"
FIND TestProp3
"
,
unique
=
True
)
assert
p2
.
datatype
==
db
.
LIST
(
db
.
INTEGER
)
assert
p2
.
value
==
[
1
,
2
]
def
test_issue_183
():
"""
No reasonable error when using bad datetime format.
https://gitlab.indiscale.com/caosdb/src/caosdb-server/-/issues/183
"""
# Date YYYY-MM-ddThh:mm:ss
assert
db
.
Property
(
name
=
"
TestDateTime
"
,
datatype
=
db
.
DATETIME
,
value
=
"
2015-05-05T20:15:00
"
).
insert
().
id
is
not
None
with
pytest
.
raises
(
db
.
TransactionError
)
as
cm
:
# Date YYYY-MM-ddThh:mm
db
.
Property
(
name
=
"
TestDateTime2
"
,
datatype
=
db
.
DATETIME
,
value
=
"
2015-05-05T20:15
"
).
insert
()
assert
cm
.
value
.
errors
[
0
].
msg
==
(
"
Cannot parse value to datetime format
"
"
(yyyy-mm-dd
'
T
'
hh:mm:ss[.fffffffff][TimeZone]).
"
)
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