use of org.springframework.ide.vscode.languageserver.testharness.Editor in project sts4 by spring-projects.
the class ConcourseEditorTest method reconcileResourceTypeType.
@Test
public void reconcileResourceTypeType() throws Exception {
Editor editor;
editor = harness.newEditor("resource_types:\n" + "- name: s3-multi\n" + " type: # <- bad\n");
editor.assertProblems("^ # <- bad|cannot be blank");
editor = harness.newEditor("resource_types:\n" + "- name: s3-multi\n" + " type: garbage\n");
editor.assertProblems("garbage|Resource Type does not exist");
}
use of org.springframework.ide.vscode.languageserver.testharness.Editor in project sts4 by spring-projects.
the class ConcourseEditorTest method getStepVersionShouldAcceptMap.
@Test
public void getStepVersionShouldAcceptMap() throws Exception {
// See https://github.com/spring-projects/sts4/pull/24
Editor editor = harness.newEditor("jobs:\n" + "- name: do-stuff\n" + " plan:\n" + " - get: cf-deployment-git\n" + " version: { ref: ((cf_deployment_commit_ref)) }");
editor.assertProblems("cf-deployment-git|resource does not exist");
}
use of org.springframework.ide.vscode.languageserver.testharness.Editor in project sts4 by spring-projects.
the class ConcourseEditorTest method reconcileDuplicateJobNames.
@Test
public void reconcileDuplicateJobNames() throws Exception {
Editor editor = harness.newEditor("jobs:\n" + "- name: job-1\n" + "- name: utils\n" + "- name: job-1\n");
editor.assertProblems("-^ name: job-1|'plan' is required", "job-1|Duplicate job name", "-^ name: utils|'plan' is required", "-^ name: job-1|'plan' is required", "job-1|Duplicate job name");
}
use of org.springframework.ide.vscode.languageserver.testharness.Editor in project sts4 by spring-projects.
the class ConcourseEditorTest method resourceTypeAttributeHovers.
@Test
public void resourceTypeAttributeHovers() 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");
editor.assertHoverContains("name", "This name will be referenced by `resources` defined within the same pipeline");
editor.assertHoverContains("type", 2, "used to provide the resource type's container image");
editor.assertHoverContains("source", 2, "The location of the resource type's resource");
}
use of org.springframework.ide.vscode.languageserver.testharness.Editor in project sts4 by spring-projects.
the class ConcourseEditorTest method gitResourcePutParamsHovers.
@Test
public void gitResourcePutParamsHovers() throws Exception {
Editor editor = harness.newEditor("resources:\n" + "- name: my-git\n" + " type: git\n" + "jobs:\n" + "- name: do-stuff\n" + " plan:\n" + " - put: my-git\n" + " params:\n" + " repository: some-other-repo\n" + " rebase: do-rebase\n" + " tag: the-tag-file\n" + " only_tag: do-tag\n" + " tag_prefix: RELEASE\n" + " force: force-it\n" + " annotate: release-annotion\n");
editor.assertHoverContains("repository", "The path of the repository");
editor.assertHoverContains("rebase", "attempt rebasing");
editor.assertHoverContains("tag", "HEAD will be tagged");
editor.assertHoverContains("only_tag", "push only the tags");
editor.assertHoverContains("tag_prefix", "prepended with this string");
editor.assertHoverContains("force", "pushed regardless of the upstream state");
editor.assertHoverContains("annotate", "path to a file containing the annotation message");
}
Aggregations