Add test for reconcile of stemcells block
This commit is contained in:
@@ -152,6 +152,18 @@ public class BoshEditorTest {
|
||||
"- alias<*>"
|
||||
);
|
||||
}
|
||||
|
||||
@Test public void stemcellReconciling() throws Exception {
|
||||
Editor editor = harness.newEditor(
|
||||
"stemcells:\n" +
|
||||
"- {}"
|
||||
);
|
||||
editor.assertProblems(
|
||||
"-|One of [name, os] is required",
|
||||
"-|[alias, version] are required",
|
||||
"}|[director_uuid, instance_groups, name, releases, update] are required"
|
||||
);
|
||||
}
|
||||
|
||||
@Test public void releasesBlockCompletions() throws Exception {
|
||||
Editor editor = harness.newEditor(
|
||||
|
||||
@@ -86,7 +86,9 @@ public class Editor {
|
||||
public int compare(Diagnostic o1, Diagnostic o2) {
|
||||
int diff = compare(o1.getRange().getStart(), o2.getRange().getStart());
|
||||
if (diff!=0) return diff;
|
||||
return compare(o1.getRange().getEnd(), o2.getRange().getEnd());
|
||||
diff = compare(o1.getRange().getEnd(), o2.getRange().getEnd());
|
||||
if (diff!=0) return diff;
|
||||
return o1.getMessage().compareTo(o2.getMessage());
|
||||
}
|
||||
|
||||
private int compare(Position p1, Position p2) {
|
||||
|
||||
Reference in New Issue
Block a user