Duplicate key validation should also work for manifest.yml

So... add a test to confirm that.
This commit is contained in:
Kris De Volder
2016-12-21 08:50:34 -08:00
parent 216e96156a
commit dce3fb74e5

View File

@@ -483,6 +483,24 @@ public class ManifestYamlEditorTest {
editor.assertNoHover("otherdomain.org");
}
@Test
public void reconcileDuplicateKeys() throws Exception {
Editor editor = harness.newEditor(
"#comment\n" +
"applications:\n" +
"- buildpack: zbuildpack\n" +
" name: foo\n" +
" domains:\n" +
" - pivotal.io\n" +
" domains:\n" +
" - otherdomain.org\n"
);
editor.assertProblems(
"domains|Duplicate key",
"domains|Duplicate key"
);
}
//////////////////////////////////////////////////////////////////////////////
private void assertCompletions(String textBefore, String... textAfter) throws Exception {