Add runner JSON schema and factory
Problem to solve
Add missing JSON schema for the runner property inside of the Projects::JobsController#show.json response. Add the missing factory for builds factory
Further details
In gitlab-org/gitlab-ee#7441 we need to return the runner quota information inside Projects::JobsController#show.json which was done in gitlab-org/gitlab-ee!7233. When implementing this a new schema for the runner property was added like below which can be migrated to ce since it is usable for ce as well.
{
"type": "object",
"required": [
"id",
"description"
],
"properties": {
"id": { "type": "integer" },
"description": { "type": "string" },
"edit_path": { "type": "string" }
}
}
In gitlab-org/gitlab-ee!7233 the following code change to spec/factories/ci/builds.rb was made that can be ported in ce as well
diff --git a/spec/factories/ci/builds.rb b/spec/factories/ci/builds.rb
index 9813190925b..088d19fc066 100644
--- a/spec/factories/ci/builds.rb
+++ b/spec/factories/ci/builds.rb
@@ -27,6 +27,8 @@ FactoryBot.define do
pipeline factory: :ci_pipeline
+ runner factory: :ci_runner
+
trait :started do
started_at 'Di 29. Okt 09:51:28 CET 2013'
end