[ARVADOS] updated: a8c9797de0fac6cc28d04daeade83d5e0c558076
git at public.curoverse.com
git at public.curoverse.com
Mon Nov 24 10:23:40 EST 2014
Summary of changes:
.../arvados/v1/keep_disks_controller.rb | 14 +++++-----
services/api/db/structure.sql | 2 +-
.../arvados/v1/keep_disks_controller_test.rb | 31 +++++++++++-----------
3 files changed, 23 insertions(+), 24 deletions(-)
via a8c9797de0fac6cc28d04daeade83d5e0c558076 (commit)
from ac4cdfc2577b9d25ccbc9ac5d8f0333a81102367 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit a8c9797de0fac6cc28d04daeade83d5e0c558076
Author: Tom Clegg <tom at curoverse.com>
Date: Mon Nov 24 10:23:31 2014 -0500
4651: Fix KeepDisksController test failures.
diff --git a/services/api/app/controllers/arvados/v1/keep_disks_controller.rb b/services/api/app/controllers/arvados/v1/keep_disks_controller.rb
index 47018d4..e8ccf23 100644
--- a/services/api/app/controllers/arvados/v1/keep_disks_controller.rb
+++ b/services/api/app/controllers/arvados/v1/keep_disks_controller.rb
@@ -3,13 +3,13 @@ class Arvados::V1::KeepDisksController < ApplicationController
def self._ping_requires_parameters
{
- uuid: false,
- ping_secret: true,
- node_uuid: false,
- filesystem_uuid: false,
- service_host: false,
- service_port: true,
- service_ssl_flag: true
+ uuid: {required: false},
+ ping_secret: {required: true},
+ node_uuid: {required: false},
+ filesystem_uuid: {required: false},
+ service_host: {required: false},
+ service_port: {required: true},
+ service_ssl_flag: {required: true}
}
end
diff --git a/services/api/db/structure.sql b/services/api/db/structure.sql
index 2eca2ca..0a2dc8d 100644
--- a/services/api/db/structure.sql
+++ b/services/api/db/structure.sql
@@ -683,8 +683,8 @@ CREATE TABLE pipeline_instances (
components text,
updated_at timestamp without time zone NOT NULL,
properties text,
- state character varying(255),
components_summary text,
+ state character varying(255),
started_at timestamp without time zone,
finished_at timestamp without time zone,
description text
diff --git a/services/api/test/functional/arvados/v1/keep_disks_controller_test.rb b/services/api/test/functional/arvados/v1/keep_disks_controller_test.rb
index ea7b5b7..82067b2 100644
--- a/services/api/test/functional/arvados/v1/keep_disks_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/keep_disks_controller_test.rb
@@ -2,12 +2,14 @@ require 'test_helper'
class Arvados::V1::KeepDisksControllerTest < ActionController::TestCase
+ def default_ping_opts
+ {ping_secret: '', service_ssl_flag: false, service_port: 1234}
+ end
+
test "add keep disk with admin token" do
authorize_with :admin
- post :ping, {
- ping_secret: '', # required by discovery doc, but ignored
- filesystem_uuid: 'eb1e77a1-db84-4193-b6e6-ca2894f67d5f'
- }
+ post :ping, default_ping_opts.
+ merge(filesystem_uuid: 'eb1e77a1-db84-4193-b6e6-ca2894f67d5f')
assert_response :success
assert_not_nil assigns(:object)
new_keep_disk = JSON.parse(@response.body)
@@ -17,30 +19,27 @@ class Arvados::V1::KeepDisksControllerTest < ActionController::TestCase
end
[
- {ping_secret: ''},
- {ping_secret: '', filesystem_uuid: ''},
+ {},
+ {filesystem_uuid: ''},
].each do |opts|
- test "add keep disk with no filesystem_uuid #{opts}" do
+ test "add keep disk with[out] filesystem_uuid #{opts}" do
authorize_with :admin
- post :ping, opts
+ post :ping, default_ping_opts.merge(opts)
assert_response :success
assert_not_nil JSON.parse(@response.body)['uuid']
end
end
test "refuse to add keep disk without admin token" do
- post :ping, {
- ping_secret: '',
- }
+ post :ping, default_ping_opts
assert_response 404
end
test "ping keep disk" do
- post :ping, {
- id: keep_disks(:nonfull).uuid,
- ping_secret: keep_disks(:nonfull).ping_secret,
- filesystem_uuid: keep_disks(:nonfull).filesystem_uuid
- }
+ post :ping, default_ping_opts.
+ merge(id: keep_disks(:nonfull).uuid,
+ ping_secret: keep_disks(:nonfull).ping_secret,
+ filesystem_uuid: keep_disks(:nonfull).filesystem_uuid)
assert_response :success
assert_not_nil assigns(:object)
keep_disk = JSON.parse(@response.body)
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list