Skip to content

Commit

Permalink
Add support for 'verbose' in...
Browse files Browse the repository at this point in the history
... CF resource 'source' in Concourse Editor.

See: #330
  • Loading branch information
kdvolder committed Jul 23, 2019
1 parent 5b3f951 commit e7d166c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,7 @@ private void initializeDefaultResourceTypes() {
addProp(source, "organization", t_ne_string).isRequired(true);
addProp(source, "space", t_ne_string).isRequired(true);
addProp(source, "skip_cert_check", t_boolean);
addProp(source, "verbose", t_boolean);

source.require(Constraints.together("username", "password"));
source.require(Constraints.together("client_id", "client_secret"));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*Optional*. Invoke `cf` cli using `CF_TRACE=true` to print all API calls made to Cloud Foundry.

Original file line number Diff line number Diff line change
Expand Up @@ -4417,7 +4417,8 @@ public void gotoResourceTypeDefinition() throws Exception {
"client_secret: <*>",
"password: <*>",
"skip_cert_check: <*>",
"username: <*>"
"username: <*>",
"verbose: <*>"
);
}

Expand Down Expand Up @@ -4523,11 +4524,13 @@ public void gotoResourceTypeDefinition() throws Exception {
" space: my-space\n" +
" username: ((secret))\n" +
" password: ((secret))\n" +
" skip_cert_check: not-bool"
" skip_cert_check: not-bool-1\n" +
" verbose: not-bool-2"
);
editor.assertProblems(
"pws|Unused",
"not-bool|boolean"
"not-bool-1|boolean",
"not-bool-2|boolean"
);
}

Expand All @@ -4544,7 +4547,8 @@ public void gotoResourceTypeDefinition() throws Exception {
" client_secret: ((cf_client_secret))\n" +
" organization: {{cf_org}}\n" +
" space: {{cf_space}}\n" +
" skip_cert_check: true<*>"
" skip_cert_check: true<*>\n" +
" verbose: true"
);
editor.assertHoverContains("api", "address of the Cloud Controller");
editor.assertHoverContains("username", "username used to authenticate");
Expand All @@ -4554,6 +4558,7 @@ public void gotoResourceTypeDefinition() throws Exception {
editor.assertHoverContains("organization", "organization to push");
editor.assertHoverContains("space", "space to push");
editor.assertHoverContains("skip_cert_check", "Check the validity of the CF SSL cert");
editor.assertHoverContains("verbose", "Invoke `cf` cli using `CF_TRACE=true`");
}

@Test public void cfPutParamsHovers() throws Exception {
Expand Down

0 comments on commit e7d166c

Please sign in to comment.