use of org.sonarsource.sonarlint.core.client.api.connected.ConnectionValidator in project sonarlint-core by SonarSource.
the class ConnectedModeExcludeByVersionTest method dontCheckMinimalPluginVersionWhenValidatingConnection.
@Test
public void dontCheckMinimalPluginVersionWhenValidatingConnection() throws ExecutionException, InterruptedException {
engine = createEngine(e -> e.addEnabledLanguages(Language.PYTHON));
var result = new ConnectionValidator(new ServerApiHelper(endpointParams(ORCHESTRATOR), sqHttpClient())).validateConnection().get();
assertThat(result.success()).isTrue();
}
use of org.sonarsource.sonarlint.core.client.api.connected.ConnectionValidator in project sonarlint-core by SonarSource.
the class SonarCloudTest method testConnection.
@Test
public void testConnection() throws ExecutionException, InterruptedException {
assertThat(new ConnectionValidator(new ServerApiHelper(sonarcloudEndpoint(SONARCLOUD_ORGANIZATION), new SonarLintHttpClientOkHttpImpl(SC_CLIENT))).validateConnection().get().success()).isTrue();
assertThat(new ConnectionValidator(new ServerApiHelper(sonarcloudEndpoint(null), new SonarLintHttpClientOkHttpImpl(SC_CLIENT))).validateConnection().get().success()).isTrue();
assertThat(new ConnectionValidator(new ServerApiHelper(sonarcloudEndpoint("not-exists"), new SonarLintHttpClientOkHttpImpl(SC_CLIENT))).validateConnection().get().success()).isFalse();
}
Aggregations