use of org.sonarqube.ws.ServerId.ShowWsResponse in project sonarqube by SonarSource.
the class ShowActionTest method return_server_id_info.
@Test
public void return_server_id_info() throws Exception {
logInAsSystemAdministrator();
when(generator.validate("home", "127.0.0.1", "1818a1eefb26f9g")).thenReturn(true);
setAvailableIpAdresses("192.168.1.1", "127.0.0.1");
insertConfiguration("1818a1eefb26f9g", "home", "127.0.0.1");
ShowWsResponse response = executeRequest();
assertThat(response.getServerId()).isEqualTo("1818a1eefb26f9g");
assertThat(response.getOrganization()).isEqualTo("home");
assertThat(response.getIp()).isEqualTo("127.0.0.1");
assertThat(response.getValidIpAddressesList()).containsOnly("192.168.1.1", "127.0.0.1");
assertThat(response.hasInvalidServerId()).isFalse();
}
Aggregations