Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TOAR-II FastAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
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
esde
toar-data
TOAR-II FastAPI
Commits
16d8489d
Commit
16d8489d
authored
4 years ago
by
Sabine Schröder
Browse files
Options
Downloads
Patches
Plain Diff
preparing everything for CI pytest. Is it possible to have PostgreSQL/PostGIS running on zam347?
parent
38717b35
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#39003
failed
4 years ago
Stage: test
Stage: deploy
Stage: pages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+15
-0
15 additions, 0 deletions
.gitlab-ci.yml
CI/do_pytest.sh
+8
-0
8 additions, 0 deletions
CI/do_pytest.sh
toardb/stationmeta/test_stationmeta.py
+7
-5
7 additions, 5 deletions
toardb/stationmeta/test_stationmeta.py
with
30 additions
and
5 deletions
.gitlab-ci.yml
+
15
−
0
View file @
16d8489d
stages
:
-
test
-
deploy
-
pages
...
...
@@ -7,6 +8,20 @@ cache:
paths
:
-
public/docs/
#### Test ####
test
:
stage
:
test
tags
:
-
leap
-
zam347
-
base
script
:
-
zypper --non-interactive install python3-pip
-
pip install --upgrade pip
-
pip install --no-cache-dir -r requirements.txt
-
chmod +x ./CI/do_pytest.sh
-
./CI/do_pytest.sh
#### Documentation ####
docs
:
stage
:
deploy
...
...
This diff is collapsed.
Click to expand it.
CI/do_pytest.sh
0 → 100644
+
8
−
0
View file @
16d8489d
#!/usr/bin/env bash
# run make command
for
MOD
in
contacts data stationmeta timeseries variables
do
pytest toardb/
$MOD
done
This diff is collapsed.
Click to expand it.
toardb/stationmeta/test_stationmeta.py
+
7
−
5
View file @
16d8489d
...
...
@@ -162,8 +162,8 @@ class TestApps:
def
test_insert_new
(
self
,
client
,
db
):
response
=
client
.
post
(
"
/stationmeta
_core
/
"
,
json
=
{
"
stationmeta
_core
"
:
response
=
client
.
post
(
"
/stationmeta/
"
,
json
=
{
"
stationmeta
"
:
{
"
codes
"
:[
"
ttt3
"
,
"
ttt4
"
],
"
name
"
:
"
Test_China
"
,
"
coordinates
"
:{
"
lat
"
:
36.256
,
"
lng
"
:
117.106
,
"
alt
"
:
1534.0
},
"
country
"
:
"
China
"
,
"
state
"
:
"
Shandong Sheng
"
,
"
coordinate_validation_status
"
:
0
,
...
...
@@ -179,13 +179,15 @@ class TestApps:
'
country
'
:
'
China
'
,
'
state
'
:
'
Shandong Sheng
'
,
'
coordinate_validation_status
'
:
0
,
'
coordinate_validation_date
'
:
'
2020-03-11T12:22:18.047974+01:00
'
,
'
type_of_environment
'
:
0
,
'
type_of_area
'
:
0
,
'
category
'
:
''
,
'
timezone
'
:
''
,
'
additional_metadata
'
:
{},
'
coordinate_validator_id
'
:
1
}
'
additional_metadata
'
:
{},
'
coordinate_validator_id
'
:
1
,
'
roles
'
:
[],
'
annotations
'
:
[],
'
aux_images
'
:
[],
'
aux_docs
'
:
[],
'
aux_urls
'
:
[],
'
globalmeta
'
:
None
,
'
globalservice
'
:
None
}
assert
response
.
json
()
==
expected_resp
def
test_insert_duplicate
(
self
,
client
,
db
):
response
=
client
.
post
(
"
/stationmeta
_core
/
"
,
json
=
{
"
stationmeta
_core
"
:
response
=
client
.
post
(
"
/stationmeta/
"
,
json
=
{
"
stationmeta
"
:
{
"
codes
"
:[
"
China11
"
],
"
name
"
:
"
Test_China
"
,
"
coordinates
"
:{
"
lat
"
:
36.256
,
"
lng
"
:
117.106
,
"
alt
"
:
1534.0
},
"
country
"
:
"
China
"
,
"
state
"
:
"
Shandong Sheng
"
,
"
coordinate_validation_status
"
:
0
,
...
...
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