Beispiel #1
0
  @Test
  public void testDeltaServiceFirstRequest() throws Exception {
    GetDeltaRequest request = new GetDeltaRequest(application.getApplicationToken());
    request.setEndpointProfile(endpointProfile);
    GetDeltaResponse response = deltaService.getDelta(request);

    assertNotNull(response);
    assertEquals(GetDeltaResponse.GetDeltaResponseType.CONF_RESYNC, response.getResponseType());
    assertNotNull(response.getDelta());
    endpointConfigurationBytes = response.getDelta().getData();
    assertNotNull(endpointConfigurationBytes);
  }
Beispiel #2
0
  @Test
  public void testDeltaServiceHashMismatch() throws Exception {
    GetDeltaRequest request =
        new GetDeltaRequest(
            application.getApplicationToken(), EndpointObjectHash.fromBytes(new byte[] {1, 2, 3}));
    request.setEndpointProfile(endpointProfile);
    GetDeltaResponse response = deltaService.getDelta(request);

    assertNotNull(response);
    assertEquals(GetDeltaResponse.GetDeltaResponseType.CONF_RESYNC, response.getResponseType());
    assertNotNull(response.getDelta());
    endpointConfigurationBytes = response.getDelta().getData();
    assertNotNull(endpointConfigurationBytes);
  }
Beispiel #3
0
 @Test
 public void testDeltaServiceNoHistoryDelta() throws Exception {
   GetDeltaRequest request =
       new GetDeltaRequest(
           application.getApplicationToken(),
           EndpointObjectHash.fromSha1(endpointConfiguration.getConfiguration()),
           true);
   request.setEndpointProfile(endpointProfile);
   GetDeltaResponse response = deltaService.getDelta(request);
   assertNotNull(response);
   assertEquals(GetDeltaResponse.GetDeltaResponseType.NO_DELTA, response.getResponseType());
   assertNull(response.getDelta());
   assertNull(response.getConfSchema());
 }