Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
workspaces
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
Package Registry
Model registry
Operate
Environments
Terraform modules
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ssa
workspaces
Commits
31d304dd
Commit
31d304dd
authored
4 years ago
by
Nathan Hertz
Browse files
Options
Downloads
Patches
Plain Diff
Added persistence tests
parent
f0a95218
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
shared/workspaces/test/test_persistence.py
+17
-0
17 additions, 0 deletions
shared/workspaces/test/test_persistence.py
with
17 additions
and
0 deletions
shared/workspaces/test/test_persistence.py
+
17
−
0
View file @
31d304dd
from
schema
import
create_session
from
workspaces.capability_interfaces
import
CapabilityInfoIF
from
workspaces.schema
import
Workflow
from
workspaces.services
import
WorkflowInfo
,
CapabilityInfo
from
workspaces.workflow_interfaces
import
WorkflowInfoIF
...
...
@@ -17,6 +18,14 @@ def get_capability_info() -> CapabilityInfoIF:
return
CapabilityInfo
(
SESSION
)
def
test_get_requests_for_capability
():
"""
Ensure we can get all requests for a certain capability
"""
info
=
get_capability_info
()
info
.
create_capability
(
"
test_get_requests
"
,
None
,
0
)
info
.
create_capability_request
(
"
test_get_requests
"
)
assert
len
(
info
.
requests_for_capability
(
"
test_get_requests
"
))
>
0
def
test_persisting_workflow_request
():
"""
Ensure we can persist a workflow request
"""
info
=
get_workflow_info
()
...
...
@@ -32,6 +41,14 @@ def test_reading_workflows():
assert
len
(
workflows
)
>
0
def
test_reading_workflow_requests
():
"""
Ensure we can get workflow requests
"""
info
=
get_workflow_info
()
workflow_requests
=
info
.
all_workflow_requests
()
print
(
workflow_requests
)
assert
len
(
workflow_requests
)
>
0
def
test_reading_capability
():
"""
Ensure we can get a capability
"""
info
=
get_capability_info
()
...
...
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