use of org.springframework.ide.vscode.languageserver.testharness.Editor in project sts4 by spring-projects.
the class ConcourseEditorTest method gitResourceGetParamsHovers.
@Test
public void gitResourceGetParamsHovers() 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");
}
use of org.springframework.ide.vscode.languageserver.testharness.Editor in project sts4 by spring-projects.
the class ConcourseEditorTest method reconcileSimpleTypes.
@Test
public void reconcileSimpleTypes() throws Exception {
Editor editor;
// check for 'format' errors:
editor = harness.newEditor("jobs:\n" + "- name: foo\n" + " serial: boohoo\n" + " max_in_flight: -1\n" + " plan:\n" + " - get: git\n" + " trigger: yohoho\n" + " attempts: 0\n" + " timeout: 1h:30m\n");
editor.assertProblems("boohoo|boolean", "-1|must be positive", "git|resource does not exist", "yohoho|boolean", "0|must be at least 1", "1h:30m|Duration");
// check that correct values are indeed accepted
editor = harness.newEditor("resources:\n" + "- name: git\n" + " type: git\n" + "jobs:\n" + "- name: foo\n" + " serial: true\n" + " max_in_flight: 2\n" + " plan:\n" + " - get: git\n" + " trigger: true");
editor.assertProblems();
}
use of org.springframework.ide.vscode.languageserver.testharness.Editor in project sts4 by spring-projects.
the class ConcourseEditorTest method taskCachesCompletions.
@Test
public void taskCachesCompletions() throws Exception {
// See: https://www.pivotaltracker.com/story/show/153861788
Editor editor = harness.newEditor(LanguageId.CONCOURSE_TASK, "platform: linux\n" + "\n" + "inputs:\n" + "- name: project-src\n" + "\n" + "caches:\n" + "- <*>\n" + "run:\n" + " path: project-src/ci/build");
editor.assertContextualCompletions(PLAIN_COMPLETION, "<*>", "path: <*>");
}
use of org.springframework.ide.vscode.languageserver.testharness.Editor in project sts4 by spring-projects.
the class ConcourseEditorTest method githubCompletionsUriTypes.
@Test
public void githubCompletionsUriTypes() throws Exception {
Editor editor = harness.newEditor("resources:\n" + "- name: my-repo\n" + " type: git\n" + " source:\n" + " uri: <*>");
editor.assertContextualCompletions("<*>", "git@github.com:<*>", "https://github.com/<*>");
editor.assertContextualCompletions("@<*>", "git@github.com:<*>");
}
use of org.springframework.ide.vscode.languageserver.testharness.Editor in project sts4 by spring-projects.
the class ConcourseEditorTest method topLevelHoverInfos.
@Test
public void topLevelHoverInfos() throws Exception {
Editor editor = harness.newEditor("resource_types:\n" + "- name: s3-multi\n" + " type: docker-image\n" + " source:\n" + " repository: kdvolder/s3-resource-simple\n" + "resources:\n" + "- name: docker-git\n" + " type: git\n" + " source:\n" + " uri: git@github.com:spring-projects/sts4.git\n" + " branch: {{branch}}\n" + " username: kdvolder\n" + " private_key: {{rsa_id}}\n" + " paths:\n" + " - concourse/docker\n" + "jobs:\n" + "- name: build-docker-image\n" + " serial: true\n" + " plan:\n" + " - get: docker-git\n" + " trigger: true\n" + " - put: docker-image\n" + " params:\n" + " build: docker-git/concourse/docker\n" + " get_params: \n" + " skip_download: true\n" + "groups:\n" + "- name: a-groups\n");
editor.assertHoverContains("resource_types", "each pipeline can configure its own custom types by specifying `resource_types` at the top level.");
editor.assertHoverContains("resources", "A resource is any entity that can be checked for new versions");
editor.assertHoverContains("jobs", "At a high level, a job describes some actions to perform");
editor.assertHoverContains("groups", "A pipeline may optionally contain a section called `groups`");
}
Aggregations