Example usage for org.springframework.vault.support VaultResponse VaultResponse

List of usage examples for org.springframework.vault.support VaultResponse VaultResponse

Introduction

In this page you can find the example usage for org.springframework.vault.support VaultResponse VaultResponse.

Prototype

VaultResponse

Source Link

Usage

From source file:de.dominikschadow.configclient.secret.SecretControllerTest.java

@Test
public void getSecretForUserReturnsOk() throws Exception {
    VaultResponse vaultResponse = new VaultResponse();
    String path = SecretController.SECRET_BASE_PATH + "12345";

    given(vaultTemplate.read(path)).willReturn(vaultResponse);

    mvc.perform(MockMvcRequestBuilders.get("/secrets/12345")).andExpect(MockMvcResultMatchers.status().isOk());
}

From source file:de.dominikschadow.configclient.secret.SecretControllerTest.java

@Test
public void getSecretContentForUserReturnsOk() throws Exception {
    VaultResponse vaultResponse = new VaultResponse();
    String path = SecretController.SECRET_BASE_PATH + "12345";

    given(vaultTemplate.read(path)).willReturn(vaultResponse);

    mvc.perform(MockMvcRequestBuilders.get("/secrets/12345?type=content"))
            .andExpect(MockMvcResultMatchers.status().isOk());
}