From 81f4e0b2f8614062ba471c72fdd236c5fce023dc Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Tue, 21 Dec 2021 12:00:28 -0500 Subject: [PATCH] 18321: Fix tests Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- lib/crunchrun/crunchrun_test.go | 6 +++--- services/api/app/models/container_request.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/crunchrun/crunchrun_test.go b/lib/crunchrun/crunchrun_test.go index 67b18857b0..97f91103a0 100644 --- a/lib/crunchrun/crunchrun_test.go +++ b/lib/crunchrun/crunchrun_test.go @@ -992,7 +992,7 @@ func (s *TestSuite) TestEnableCUDADeviceCount(c *C) { "mounts": {"/tmp": {"kind": "tmp"} }, "output_path": "/tmp", "priority": 1, - "runtime_constraints": {"cuda_device_count": 2}, + "runtime_constraints": {"cuda": {"device_count": 2}}, "state": "Locked", "output_storage_classes": ["foo", "bar"] }`, nil, 0, func() { @@ -1010,13 +1010,13 @@ func (s *TestSuite) TestEnableCUDAHardwareCapability(c *C) { "mounts": {"/tmp": {"kind": "tmp"} }, "output_path": "/tmp", "priority": 1, - "runtime_constraints": {"cuda_hardware_capability": "foo"}, + "runtime_constraints": {"cuda": {"hardware_capability": "foo"}}, "state": "Locked", "output_storage_classes": ["foo", "bar"] }`, nil, 0, func() { fmt.Fprintln(s.executor.created.Stdout, "ok") }) - c.Check(s.executor.created.CUDADeviceCount, Equals, 1) + c.Check(s.executor.created.CUDADeviceCount, Equals, 0) } func (s *TestSuite) TestStopOnSignal(c *C) { diff --git a/services/api/app/models/container_request.rb b/services/api/app/models/container_request.rb index a3264e419b..17247246c0 100644 --- a/services/api/app/models/container_request.rb +++ b/services/api/app/models/container_request.rb @@ -348,7 +348,7 @@ class ContainerRequest < ArvadosModel v = runtime_constraints['cuda'][k] if !v.is_a?(String) || (runtime_constraints['cuda']['device_count'] > 0 && v.to_f == 0.0) errors.add(:runtime_constraints, - "[cuda.#{k}]=#{v.inspect} must be a string in format 'X.Y' version") + "[cuda.#{k}]=#{v.inspect} must be a string in format 'X.Y'") end end end -- 2.30.2