Completions for 'resourceName' in put and get task

This commit is contained in:
Kris De Volder
2016-12-20 21:01:17 -08:00
parent ae9e3591de
commit 3837c8a9e4
5 changed files with 54 additions and 9 deletions

View File

@@ -406,6 +406,39 @@ public class PipelineYamlEditorTest {
"bogus-get|[sts4]",
"bogus-put|[sts4]"
);
}
@Test
public void completionsResourceReferences() throws Exception {
assertContextualCompletions(
"resources:\n" +
"- name: sts4\n" +
"- name: repo-a\n" +
"- name: repo-b\n" +
"jobs:\n" +
"- name: job1\n" +
" plan:\n" +
" - get: <*>\n"
, ////////////////////
"<*>"
, // =>
"repo-a<*>", "repo-b<*>", "sts4<*>"
);
assertContextualCompletions(
"resources:\n" +
"- name: sts4\n" +
"- name: repo-a\n" +
"- name: repo-b\n" +
"jobs:\n" +
"- name: job1\n" +
" plan:\n" +
" - put: <*>\n"
, ////////////////////
"r<*>"
, // =>
"repo-a<*>", "repo-b<*>"
);
}

View File

@@ -3,6 +3,14 @@ resources:
type: git
source:
repository: https://github.com/kdvolder/somestuff
- name: other-repo
type: git
source:
repository: https://github.com/kdvolder/somestuff
- name: more-stuff
type: git
source:
repository: https://github.com/kdvolder/somestuff
jobs:
- name: job1
plan: