Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nomad-FAIR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
nomad-lab
nomad-FAIR
Commits
e8f65ced
Commit
e8f65ced
authored
5 years ago
by
Markus Scheidgen
Browse files
Options
Downloads
Patches
Plain Diff
Fixed failed test cases.
parent
cebf4c81
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!48
v0.5.0 Release
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
nomad/cli/client/mirror.py
+7
-4
7 additions, 4 deletions
nomad/cli/client/mirror.py
nomad/coe_repo/user.py
+5
-0
5 additions, 0 deletions
nomad/coe_repo/user.py
with
12 additions
and
4 deletions
nomad/cli/client/mirror.py
+
7
−
4
View file @
e8f65ced
...
...
@@ -113,10 +113,7 @@ def mirror(
try
:
upload
=
proc
.
Upload
.
get
(
upload_id
)
if
__in_test
:
proc
.
Calc
.
objects
(
upload_id
=
upload_id
).
delete
()
proc
.
Upload
.
objects
(
upload_id
=
upload_id
).
delete
()
search
.
delete_upload
(
upload_id
)
# In tests, we mirror from our selves, fake that the upload does not exist
raise
KeyError
()
if
len
(
query
)
>
0
:
...
...
@@ -129,6 +126,12 @@ def mirror(
upload_data
=
client
.
mirror
.
get_upload_mirror
(
upload_id
=
upload_id
).
response
().
result
n_calcs
=
len
(
upload_data
.
calcs
)
if
__in_test
:
# In tests, we mirror from our selves, remove it so it is not there for import
proc
.
Calc
.
objects
(
upload_id
=
upload_id
).
delete
()
proc
.
Upload
.
objects
(
upload_id
=
upload_id
).
delete
()
search
.
delete_upload
(
upload_id
)
else
:
n_calcs
=
0
...
...
This diff is collapsed.
Click to expand it.
nomad/coe_repo/user.py
+
5
−
0
View file @
e8f65ced
...
...
@@ -135,6 +135,11 @@ class User(Base): # type: ignore
# TODO this has to change, e.g. trade for JWTs
token
=
''
.
join
(
random
.
choices
(
User
.
_token_chars
,
k
=
64
))
session
=
Session
(
token
=
token
,
user
=
self
)
# This will allow to add session to repo_db, even though it is already
# attached to a different repo_db SQL alchemy session. This happens during
# migration tests, where we mimic the use of two different postgres
# databases
session
=
repo_db
.
merge
(
session
)
repo_db
.
add
(
session
)
repo_db
.
commit
()
...
...
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