Small tweak to 'Please login to CF' message
This commit is contained in:
@@ -29,7 +29,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
*/
|
||||
public class CfCliParamsProvider implements ClientParamsProvider {
|
||||
|
||||
public static final String NO_CLI_TARGETS_FOUND_MESSAGE = "Unable to fetch information from Cloud Foundry. Please use cf CLI to configure and login to Cloud Foundry.";
|
||||
public static final String NO_CLI_TARGETS_FOUND_MESSAGE = "No Cloudfoundry Targets: Please use the cf CLI to login.";
|
||||
public static final String TARGET = "Target";
|
||||
public static final String REFRESH_TOKEN = "RefreshToken";
|
||||
public static final String ORGANIZATION_FIELDS = "OrganizationFields";
|
||||
|
||||
@@ -59,7 +59,7 @@ public abstract class AbstractCFHintsProvider implements Callable<Collection<YVa
|
||||
// Do not log the no-targets exception as it may be encountered
|
||||
// frequently
|
||||
// if a user does not have a CF client installed
|
||||
throw new ValueParseException("No Cloudfoundry Targets: "+ExceptionUtil.getMessageNoAppendedInformation(noTargetsError));
|
||||
throw new ValueParseException(ExceptionUtil.getMessageNoAppendedInformation(noTargetsError));
|
||||
} else {
|
||||
// Log any other error
|
||||
logger.log(Level.SEVERE, ExceptionUtil.getMessage(e), e);
|
||||
|
||||
@@ -854,9 +854,7 @@ public class ManifestYamlEditorTest {
|
||||
public void servicesContentAssistShowErrorMessageWhenNotLoggedIn() throws Exception {
|
||||
reset(cloudfoundry.paramsProvider);
|
||||
|
||||
String exceptionMessage = "Please login to cf";
|
||||
|
||||
when(cloudfoundry.paramsProvider.getParams()).thenThrow(new NoTargetsException(exceptionMessage));
|
||||
when(cloudfoundry.paramsProvider.getParams()).thenThrow(new NoTargetsException("No Cloudfoundry Targets: Please login"));
|
||||
|
||||
String textBefore =
|
||||
"applications:\n" +
|
||||
@@ -871,7 +869,7 @@ public class ManifestYamlEditorTest {
|
||||
editor.assertCompletions(textBefore);
|
||||
|
||||
//The message from the exception should appear in the 'doc string':
|
||||
editor.assertCompletionDetails("No Cloudfoundry Targets", "Error", exceptionMessage);
|
||||
editor.assertCompletionDetails("No Cloudfoundry Targets", "Error", "Please login");
|
||||
|
||||
}
|
||||
|
||||
@@ -879,9 +877,7 @@ public class ManifestYamlEditorTest {
|
||||
public void servicesContentAssistShowErrorMessageWhenNotLoggedIn_nonEmptyQueryString() throws Exception {
|
||||
reset(cloudfoundry.paramsProvider);
|
||||
|
||||
String exceptionMessage = "Please login to cf";
|
||||
|
||||
when(cloudfoundry.paramsProvider.getParams()).thenThrow(new NoTargetsException(exceptionMessage));
|
||||
when(cloudfoundry.paramsProvider.getParams()).thenThrow(new NoTargetsException("No Cloudfoundry Targets: Please login"));
|
||||
|
||||
String textBefore =
|
||||
"applications:\n" +
|
||||
@@ -896,7 +892,7 @@ public class ManifestYamlEditorTest {
|
||||
editor.assertCompletions(textBefore);
|
||||
|
||||
//The message from the exception should appear in the 'doc string':
|
||||
CompletionItem completion = editor.assertCompletionDetails("No Cloudfoundry Targets", "Error", exceptionMessage);
|
||||
CompletionItem completion = editor.assertCompletionDetails("No Cloudfoundry Targets", "Error", "Please login");
|
||||
//query string should match the 'filter text' otherwise vscode will filter the item and it will be gone!
|
||||
assertEquals("something", completion.getFilterText());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user