Fix failing test cases and add missing doc snippets.

This commit is contained in:
Kris De Volder
2017-12-21 16:24:31 -08:00
parent c0880f6532
commit 13d900b58f
5 changed files with 6 additions and 4 deletions

View File

@@ -226,9 +226,7 @@ public class PipelineYmlSchema implements YamlSchema {
AbstractType t_image_resource = f.ybean("ImageResource");
{
Map<String, YTypedProperty> resourceProperties = t_resource.getPropertiesMap();
//Some of the properties in 'image_resource' are just like the ones in regular resource.
// So let's copy them...
t_image_resource.addProperty(resourceProperties.get("type"));
addProp(t_image_resource, "type", t_resource_type_name).isRequired(true);
t_image_resource.addProperty(resourceProperties.get("source"));
addProp(t_image_resource, "params", t_params);
//TODO: make ImageResourceParams dynamic based on resource type. Somewhat like below, but that code isn't exactly

View File

@@ -0,0 +1 @@
*Optional.* A map of arbitrary configuration to forward to the resource. Refer to the resource type's documentation to see what it supports.

View File

@@ -0,0 +1 @@
*Required.* The type of the resource. Usually `docker-image`.

View File

@@ -0,0 +1 @@
Optional. A specific version of the resource to fetch. This should be a map with string keys and values. If not specified, the latest version will be fetched.

View File

@@ -4251,12 +4251,13 @@ public class ConcourseEditorTest {
" path: blah\n" +
"image_resource:\n" +
" type: docker-image\n" +
" params: {}\n" +
" source:\n" +
" repository: some-docker-image\n" +
" version: latest"
);
editor.assertHoverContains("type", "type of the resource. Usually `docker-image`.");
editor.assertHoverContains("source", "Configuration for the resource");
editor.assertHoverContains(" source", "The location of the resource");
editor.assertHoverContains("params", "A map of arbitrary configuration to forward to the resource");
editor.assertHoverContains("version", "A specific version of the resource to fetch");
}