From 5f61308c0252f1da8337897b8682337f8456cbc5 Mon Sep 17 00:00:00 2001 From: "nsingh@pivotal.io" Date: Tue, 11 Dec 2018 09:25:04 -0800 Subject: [PATCH] More junit fixes around `buildpacks` --- .../manifest/yaml/ManifestYamlEditorTest.java | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/headless-services/manifest-yaml-language-server/src/test/java/org/springframework/ide/vscode/manifest/yaml/ManifestYamlEditorTest.java b/headless-services/manifest-yaml-language-server/src/test/java/org/springframework/ide/vscode/manifest/yaml/ManifestYamlEditorTest.java index 66d2c26d2..096c5fc59 100644 --- a/headless-services/manifest-yaml-language-server/src/test/java/org/springframework/ide/vscode/manifest/yaml/ManifestYamlEditorTest.java +++ b/headless-services/manifest-yaml-language-server/src/test/java/org/springframework/ide/vscode/manifest/yaml/ManifestYamlEditorTest.java @@ -261,7 +261,10 @@ public class ManifestYamlEditorTest { "applications:\n"+ "- name: <*>", // --------------- - "buildpack: <*>", + "buildpack: <*>", // Deprecated but still supported + // --------------- + "buildpacks:\n"+ + "- <*>", // --------------- "command: <*>", // --------------- @@ -342,6 +345,11 @@ public class ManifestYamlEditorTest { // --------------- "applications:\n" + "- name: foo\n" + + " buildpacks:\n"+ + " - <*>", + // --------------- + "applications:\n" + + "- name: foo\n" + " command: <*>", // --------------- "applications:\n" + @@ -981,7 +989,8 @@ public class ManifestYamlEditorTest { Editor editor = harness.newEditor( "#comment\n" + "applications:\n" + - "- buildpack: zbuildpack\n" + + "- buildpacks:\n" + + " - zbuildpack\n" + " name: foo\n" + " domains:\n" + " - pivotal.io\n" + @@ -1107,7 +1116,8 @@ public class ManifestYamlEditorTest { editor = harness.newEditor( "applications:\n" + "- name: foo\n" + - " buildpack: bad-buildpack\n" + + " buildpacks:\n " + + " - bad-buildpack\n" + " stack: blah\n" + " domain: something-domain.com\n" + " services:\n" + @@ -1161,7 +1171,8 @@ public class ManifestYamlEditorTest { Editor editor = harness.newEditor( "applications:\n" + "- name: foo\n" + - " buildpack: bad-buildpack\n" + + " buildpacks:\n " + + " - bad-buildpack\n" + " stack: bad-stack\n" + " services:\n" + " - bad-service\n" + @@ -1360,7 +1371,7 @@ public class ManifestYamlEditorTest { when(buildPack.getName()).thenReturn("java_buildpack"); when(cfClient.getBuildpacks()).thenReturn(ImmutableList.of(buildPack)); - CompletionItem completion = assertCompletions("buildpacks: \n - <*>", "- java_buildpack<*>").get(0); + CompletionItem completion = assertCompletions("buildpacks: \n - <*>", " - java_buildpack<*>").get(0); assertEquals("java_buildpack", completion.getLabel()); assertDocumentation("an-org : a-space [test.io]", completion); }