Add more testcases for yaml merge-node reconciling
This commit is contained in:
@@ -4944,6 +4944,39 @@ public class ConcourseEditorTest {
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void reconcileMalformedMergeNode() throws Exception {
|
||||
Editor editor = harness.newEditor(
|
||||
"resources:\n" +
|
||||
"- name: foo\n" +
|
||||
" type: git\n" +
|
||||
" source:\n" +
|
||||
" <<: scalar\n"
|
||||
);
|
||||
editor.assertProblems(
|
||||
"foo|Unused",
|
||||
"source|'uri' is required",
|
||||
"scalar|Expected a mapping or list of mappings"
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void reconcileMalformedMergeNodeList() throws Exception {
|
||||
Editor editor = harness.newEditor(
|
||||
"resources:\n" +
|
||||
"- name: foo\n" +
|
||||
" type: git\n" +
|
||||
" source:\n" +
|
||||
" <<:\n" +
|
||||
" - scalar\n"
|
||||
);
|
||||
editor.assertProblems(
|
||||
"foo|Unused",
|
||||
"source|'uri' is required",
|
||||
"scalar|Expected a mapping for merging"
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void anchorsAndReferenceSample_1() throws Exception {
|
||||
Editor editor = harness.newEditor(
|
||||
|
||||
Reference in New Issue
Block a user