concourse: validation and ca for input-mapping values
This commit is contained in:
@@ -128,7 +128,7 @@ public class PipelineYmlSchema implements YamlSchema {
|
||||
prop(taskStep, "privileged", t_boolean);
|
||||
prop(taskStep, "params", t_params);
|
||||
prop(taskStep, "image", t_ne_string);
|
||||
prop(taskStep, "input_mapping", t_string_params);
|
||||
prop(taskStep, "input_mapping", f.ymap(t_ne_string, resourceName));
|
||||
prop(taskStep, "output_mapping", t_string_params);
|
||||
|
||||
YBeanType aggregateStep = f.ybean("AggregateStep");
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
*******************************************************************************/
|
||||
package org.springframework.ide.vscode.concourse;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.springframework.ide.vscode.languageserver.testharness.TestAsserts.assertContains;
|
||||
|
||||
import java.io.InputStream;
|
||||
@@ -20,7 +19,6 @@ import java.util.stream.Collectors;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.ide.vscode.commons.util.IOUtil;
|
||||
import org.springframework.ide.vscode.concourse.ConcourseLanguageServer;
|
||||
import org.springframework.ide.vscode.languageserver.testharness.Editor;
|
||||
import org.springframework.ide.vscode.languageserver.testharness.LanguageServerHarness;
|
||||
|
||||
@@ -462,15 +460,21 @@ public class PipelineYamlEditorTest {
|
||||
" plan:\n" +
|
||||
" - get: sts4\n" +
|
||||
" - get: bogus-get\n" +
|
||||
" - task: do-stuff\n" +
|
||||
" input_mapping:\n" +
|
||||
" task-input: bogus-input\n" +
|
||||
" repo: sts4\n" +
|
||||
" - put: bogus-put\n"
|
||||
);
|
||||
editor.assertProblems(
|
||||
"bogus-get|resource does not exist",
|
||||
"bogus-input|resource does not exist",
|
||||
"bogus-put|resource does not exist"
|
||||
);
|
||||
|
||||
editor.assertProblems(
|
||||
"bogus-get|[sts4]",
|
||||
"bogus-input|[sts4]",
|
||||
"bogus-put|[sts4]"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -15,5 +15,9 @@ jobs:
|
||||
- name: job1
|
||||
plan:
|
||||
- get: sts4
|
||||
- task: do-stuff
|
||||
input_mapping:
|
||||
task_input: bogus_input
|
||||
repo: sts4
|
||||
- get: bogus-get
|
||||
- put: bogus-put
|
||||
|
||||
Reference in New Issue
Block a user