use of org.graylog.plugins.sidecar.rest.requests.RegistrationRequest in project graylog2-server by Graylog2.
the class SidecarResourceTest method testRegisterMissingOperatingSystem.
@Test
@Ignore
public void testRegisterMissingOperatingSystem() throws Exception {
final RegistrationRequest invalid = RegistrationRequest.create("nodeName", NodeDetails.create("", null, null, null, null));
final Response response = this.resource.register("sidecarId", invalid, "0.0.1");
assertThat(response).isError();
assertThat(response).isStatus(Response.Status.BAD_REQUEST);
}
use of org.graylog.plugins.sidecar.rest.requests.RegistrationRequest in project graylog2-server by Graylog2.
the class SidecarResourceTest method testRegisterInvalidCollectorId.
@Test
@Ignore
public void testRegisterInvalidCollectorId() throws Exception {
final RegistrationRequest invalid = RegistrationRequest.create("nodeName", NodeDetails.create("DummyOS 1.0", null, null, null, null));
final Response response = this.resource.register("", invalid, "0.0.1");
assertThat(response).isError();
assertThat(response).isStatus(Response.Status.BAD_REQUEST);
}
use of org.graylog.plugins.sidecar.rest.requests.RegistrationRequest in project graylog2-server by Graylog2.
the class SidecarResourceTest method testRegisterMissingNodeDetails.
@Test
@Ignore
public void testRegisterMissingNodeDetails() throws Exception {
final RegistrationRequest invalid = RegistrationRequest.create("nodeName", null);
final Response response = this.resource.register("sidecarId", invalid, "0.0.1");
assertThat(response).isError();
assertThat(response).isStatus(Response.Status.BAD_REQUEST);
}
use of org.graylog.plugins.sidecar.rest.requests.RegistrationRequest in project graylog2-server by Graylog2.
the class SidecarResourceTest method testRegisterInvalidNodeId.
@Test
@Ignore
public void testRegisterInvalidNodeId() throws Exception {
final RegistrationRequest invalid = RegistrationRequest.create("", NodeDetails.create("DummyOS 1.0", null, null, null, null));
final Response response = this.resource.register("sidecarId", invalid, "0.0.1");
assertThat(response).isError();
assertThat(response).isStatus(Response.Status.BAD_REQUEST);
}
use of org.graylog.plugins.sidecar.rest.requests.RegistrationRequest in project graylog2-server by Graylog2.
the class SidecarResourceTest method testRegister.
@Test
public void testRegister() throws Exception {
final RegistrationRequest input = RegistrationRequest.create("nodeName", NodeDetails.create("DummyOS 1.0", null, null, null, null));
final Response response = this.resource.register("sidecarId", input, "0.0.1");
assertThat(response).isSuccess();
}
Aggregations