Hoverinfos for git resource get params.

This commit is contained in:
Kris De Volder
2017-01-21 11:06:38 -08:00
parent 0eabef9787
commit 3d8f38c238
4 changed files with 76 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
*Optional.* If a positive integer is given, *shallow* clone the
repository using the `--depth` option. Using this flag voids your warranty.
Some things will stop working unless we have the entire history.

View File

@@ -0,0 +1 @@
*Optional.* If `true`, will not fetch Git LFS files.

View File

@@ -0,0 +1,3 @@
*Optional.* If `none`, submodules will not be fetched. If specified as
a list of paths, only the given paths will be fetched. If not specified,
or if `all` is explicitly specified, all submodules are fetched.

View File

@@ -17,6 +17,7 @@ import java.util.Arrays;
import java.util.stream.Collectors;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.springframework.ide.vscode.commons.util.IOUtil;
import org.springframework.ide.vscode.languageserver.testharness.Editor;
@@ -815,6 +816,25 @@ public class PipelineYamlEditorTest {
}
@Test public void gitResourceGetParamsReconcile() throws Exception {
Editor editor = harness.newEditor(
"resources:\n" +
"- name: my-git\n" +
" type: git\n" +
"jobs:\n" +
"- name: do-stuff\n" +
" plan:\n" +
" - get: my-git\n" +
" params:\n" +
" depth: -1\n" +
" disable_git_lfs: not-bool\n" +
" submodules: none"
);
editor.assertHoverContains("depth", "using the `--depth` option");
editor.assertHoverContains("submodules", "If `none`, submodules will not be fetched");
editor.assertHoverContains("disable_git_lfs", "will not fetch Git LFS files");
}
@Test public void gitResourceGetParamsHovers() throws Exception {
Editor editor = harness.newEditor(
"resources:\n" +
"- name: my-git\n" +
@@ -833,6 +853,55 @@ public class PipelineYamlEditorTest {
);
}
@Ignore
@Test public void gitResourcePutParamsCompletions() throws Exception {
String context =
"resources:\n" +
"- name: my-git\n" +
" type: git\n" +
"jobs:\n" +
"- name: do-stuff\n" +
" plan:\n" +
" - put: my-git\n" +
" params:\n" +
" <*>";
assertContextualCompletions(context,
"<*>"
, // ===>
"repository: <*>"
,
"rebase: <*>"
,
"tag: <*>\n"
,
"only_tag: <*>"
,
"tag_prefix: <*>"
,
"force: <*>"
,
"annotate: <*>"
);
assertContextualCompletions(context,
"rebase: <*>"
, // ===>
"rebase: false<*>",
"rebase: true<*>"
);
assertContextualCompletions(context,
"only_tag: <*>"
, // ===>
"only_tag: false<*>",
"only_tag: true<*>"
);
assertContextualCompletions(context,
"force: <*>"
, // ===>
"force: false<*>",
"force: true<*>"
);
}
@Test
public void contentAssistJobNames() throws Exception {