Search in sources :

Example 1 with WsConnector

use of org.sonarqube.ws.client.WsConnector in project sonarqube by SonarSource.

the class EventTest method old_ws_events_does_not_allow_creating_events_on_modules.

@Test
public void old_ws_events_does_not_allow_creating_events_on_modules() {
    SonarScanner sampleProject = SonarScanner.create(projectDir("shared/xoo-multi-modules-sample"));
    orchestrator.executeBuild(sampleProject);
    WsConnector wsConnector = ItUtils.newAdminWsClient(orchestrator).wsConnector();
    WsResponse response = wsConnector.call(newCreateEventRequest("com.sonarsource.it.samples:multi-modules-sample", "bar"));
    assertThat(response.code()).isEqualTo(200);
    assertThat(wsConnector.call(newCreateEventRequest("com.sonarsource.it.samples:multi-modules-sample:module_a", "bar")).code()).isEqualTo(400);
}
Also used : WsConnector(org.sonarqube.ws.client.WsConnector) WsResponse(org.sonarqube.ws.client.WsResponse) SonarScanner(com.sonar.orchestrator.build.SonarScanner) Test(org.junit.Test)

Aggregations

SonarScanner (com.sonar.orchestrator.build.SonarScanner)1 Test (org.junit.Test)1 WsConnector (org.sonarqube.ws.client.WsConnector)1 WsResponse (org.sonarqube.ws.client.WsResponse)1