3185: Fix job validation failure with no errors given.
authorTom Clegg <tom@curoverse.com>
Fri, 4 Jul 2014 17:01:28 +0000 (13:01 -0400)
committerTom Clegg <tom@curoverse.com>
Fri, 4 Jul 2014 17:01:28 +0000 (13:01 -0400)
commit6caf9c476d842c59883ca7087182fde2445bd712
tree9fed6b7966f911294581c9388752605d8313bbe4
parent45f70bea3eb3760d5a7572625c63c9d079b1cd77
3185: Fix job validation failure with no errors given.

* Do not fail docker validation if runtime_constraints==nil.

* Reposition "check docker image" and "check script version" as
  validations, rather than before_validation and before_create/update
  filters respectively.

* Use valid values for the non-docker attributes in docker test cases.

* Add tests to ensure job validation failures provide error messages.

Move test/functional/arvados/v1/git_setup.rb to
test/helpers/git_test_helper.rb and fix bugs:

* Use "setup do" form instead of "def setup" to avoid clobbering other
  setup tasks

* Restore git_repositories_dir to its original value during teardown,
  to avoid polluting other tests
services/api/app/models/job.rb
services/api/test/functional/arvados/v1/commits_controller_test.rb
services/api/test/functional/arvados/v1/git_setup.rb [deleted file]
services/api/test/functional/arvados/v1/job_reuse_controller_test.rb
services/api/test/functional/arvados/v1/jobs_controller_test.rb
services/api/test/helpers/git_test_helper.rb [new file with mode: 0644]
services/api/test/integration/crunch_dispatch_test.rb
services/api/test/integration/serialized_encoding_test.rb
services/api/test/unit/job_test.rb