Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
buildgrid
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
6
Snippets
Groups
Projects
Show more breadcrumbs
BuildGrid
buildgrid
Commits
f9261257
Commit
f9261257
authored
6 years ago
by
Finn
Browse files
Options
Downloads
Patches
Plain Diff
tests/integration/operations_service.py: Removing redundant test.
parent
6b779d3a
No related branches found
No related tags found
1 merge request
!112
Cancellation of leases.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/integration/operations_service.py
+0
-27
0 additions, 27 deletions
tests/integration/operations_service.py
with
0 additions
and
27 deletions
tests/integration/operations_service.py
+
0
−
27
View file @
f9261257
...
...
@@ -28,10 +28,8 @@ from buildgrid._enums import OperationStage
from
buildgrid._exceptions
import
InvalidArgumentError
from
buildgrid._protos.build.bazel.remote.execution.v2
import
remote_execution_pb2
from
buildgrid._protos.google.longrunning
import
operations_pb2
from
buildgrid._protos.google.rpc
import
status_pb2
from
buildgrid.server.cas.storage
import
lru_memory_cache
from
buildgrid.server.controller
import
ExecutionController
from
buildgrid.server.job
import
LeaseState
from
buildgrid.server.operations
import
service
from
buildgrid.server.operations.service
import
OperationsService
from
buildgrid.utils
import
create_digest
...
...
@@ -166,31 +164,6 @@ def test_list_operations_instance_fail(instance, controller, execute_request, co
context
.
set_code
.
assert_called_once_with
(
grpc
.
StatusCode
.
INVALID_ARGUMENT
)
def
test_list_operations_with_result
(
instance
,
controller
,
execute_request
,
context
):
response_execute
=
controller
.
execution_instance
.
execute
(
execute_request
.
action_digest
,
execute_request
.
skip_cache_lookup
)
action_result
=
remote_execution_pb2
.
ActionResult
()
output_file
=
remote_execution_pb2
.
OutputFile
(
path
=
'
unicorn
'
)
action_result
.
output_files
.
extend
([
output_file
])
controller
.
operations_instance
.
_scheduler
.
jobs
[
response_execute
.
name
].
create_lease
()
controller
.
operations_instance
.
_scheduler
.
update_job_lease_state
(
response_execute
.
name
,
LeaseState
.
COMPLETED
,
lease_status
=
status_pb2
.
Status
(),
lease_result
=
_pack_any
(
action_result
))
request
=
operations_pb2
.
ListOperationsRequest
(
name
=
instance_name
)
response
=
instance
.
ListOperations
(
request
,
context
)
assert
response
.
operations
[
0
].
name
.
split
(
'
/
'
)[
-
1
]
==
response_execute
.
name
execute_response
=
remote_execution_pb2
.
ExecuteResponse
()
response
.
operations
[
0
].
response
.
Unpack
(
execute_response
)
assert
execute_response
.
result
.
output_files
==
action_result
.
output_files
def
test_list_operations_empty
(
instance
,
context
):
request
=
operations_pb2
.
ListOperationsRequest
(
name
=
instance_name
)
...
...
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