9898: Remove unused code
authorTom Clegg <tom@curoverse.com>
Thu, 8 Sep 2016 20:11:59 +0000 (16:11 -0400)
committerTom Clegg <tom@curoverse.com>
Thu, 8 Sep 2016 20:11:59 +0000 (16:11 -0400)
sdk/go/dispatch/dispatch.go
services/api/test/functional/arvados/v1/containers_controller_test.rb

index aa79747564b0975143e851b725ad6f2ab49b58f8..a48613292eba54c594cd4eb8ed9a13cf64011c70 100644 (file)
@@ -193,13 +193,6 @@ func (dispatcher *Dispatcher) handleUpdate(container arvados.Container) {
 
 // UpdateState makes an API call to change the state of a container.
 func (dispatcher *Dispatcher) UpdateState(uuid string, newState arvados.ContainerState) error {
-       if newState == Locked {
-               return dispatcher.Lock(uuid)
-       } else if newState == Queued {
-               return dispatcher.Unlock(uuid)
-       }
-
-       // All other states
        err := dispatcher.Arv.Update("containers", uuid,
                arvadosclient.Dict{
                        "container": arvadosclient.Dict{"state": newState}},
index abaa6129c6978b536660dfabd5e71081a46a59e0..04c66a71b2e68c6d6f956c585b391eac9d4056c1 100644 (file)
@@ -72,24 +72,6 @@ class Arvados::V1::ContainersControllerTest < ActionController::TestCase
     assert_nil container.auth_uuid
   end
 
-  def create_new_container attrs={}
-    attrs = {
-      command: ['echo', 'foo'],
-      container_image: 'img',
-      output_path: '/tmp',
-      priority: 1,
-      runtime_constraints: {"vcpus" => 1, "ram" => 1},
-    }
-    c = Container.new attrs.merge(attrs)
-    c.save!
-    cr = ContainerRequest.new attrs.merge(attrs)
-    cr.save!
-    assert cr.update_attributes(container_uuid: c.uuid,
-                                state: ContainerRequest::Committed,
-                               ), show_errors(cr)
-    return c
-  end
-
   [
     [:queued, :lock, :success, 'Locked'],
     [:queued, :unlock, 403, 'Queued'],