|
|
@ -124,7 +124,7 @@ public class EndpointDocumentation {
|
|
|
|
public void setLogger() throws Exception {
|
|
|
|
public void setLogger() throws Exception {
|
|
|
|
this.mockMvc
|
|
|
|
this.mockMvc
|
|
|
|
.perform(post("/loggers/org.springframework.boot")
|
|
|
|
.perform(post("/loggers/org.springframework.boot")
|
|
|
|
.contentType(ActuatorMediaTypes.APPLICATION_ACTUATOR_V1_JSON)
|
|
|
|
.contentType(ActuatorMediaTypes.APPLICATION_ACTUATOR_V2_JSON)
|
|
|
|
.content("{\"configuredLevel\": \"DEBUG\"}"))
|
|
|
|
.content("{\"configuredLevel\": \"DEBUG\"}"))
|
|
|
|
.andExpect(status().isOk()).andDo(document("set-logger"));
|
|
|
|
.andExpect(status().isOk()).andDo(document("set-logger"));
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -133,7 +133,7 @@ public class EndpointDocumentation {
|
|
|
|
public void auditEvents() throws Exception {
|
|
|
|
public void auditEvents() throws Exception {
|
|
|
|
this.mockMvc
|
|
|
|
this.mockMvc
|
|
|
|
.perform(get("/auditevents").param("after", "2016-11-01T10:00:00+0000")
|
|
|
|
.perform(get("/auditevents").param("after", "2016-11-01T10:00:00+0000")
|
|
|
|
.accept(ActuatorMediaTypes.APPLICATION_ACTUATOR_V1_JSON))
|
|
|
|
.accept(ActuatorMediaTypes.APPLICATION_ACTUATOR_V2_JSON))
|
|
|
|
.andExpect(status().isOk()).andDo(document("auditevents"));
|
|
|
|
.andExpect(status().isOk()).andDo(document("auditevents"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -142,7 +142,7 @@ public class EndpointDocumentation {
|
|
|
|
this.mockMvc
|
|
|
|
this.mockMvc
|
|
|
|
.perform(get("/auditevents").param("principal", "admin")
|
|
|
|
.perform(get("/auditevents").param("principal", "admin")
|
|
|
|
.param("after", "2016-11-01T10:00:00+0000")
|
|
|
|
.param("after", "2016-11-01T10:00:00+0000")
|
|
|
|
.accept(ActuatorMediaTypes.APPLICATION_ACTUATOR_V1_JSON))
|
|
|
|
.accept(ActuatorMediaTypes.APPLICATION_ACTUATOR_V2_JSON))
|
|
|
|
.andExpect(status().isOk())
|
|
|
|
.andExpect(status().isOk())
|
|
|
|
.andDo(document("auditevents/filter-by-principal"));
|
|
|
|
.andDo(document("auditevents/filter-by-principal"));
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -153,7 +153,7 @@ public class EndpointDocumentation {
|
|
|
|
.perform(get("/auditevents").param("principal", "admin")
|
|
|
|
.perform(get("/auditevents").param("principal", "admin")
|
|
|
|
.param("after", "2016-11-01T10:00:00+0000")
|
|
|
|
.param("after", "2016-11-01T10:00:00+0000")
|
|
|
|
.param("type", "AUTHENTICATION_SUCCESS")
|
|
|
|
.param("type", "AUTHENTICATION_SUCCESS")
|
|
|
|
.accept(ActuatorMediaTypes.APPLICATION_ACTUATOR_V1_JSON))
|
|
|
|
.accept(ActuatorMediaTypes.APPLICATION_ACTUATOR_V2_JSON))
|
|
|
|
.andExpect(status().isOk())
|
|
|
|
.andExpect(status().isOk())
|
|
|
|
.andDo(document("auditevents/filter-by-principal-and-type"));
|
|
|
|
.andDo(document("auditevents/filter-by-principal-and-type"));
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -172,7 +172,7 @@ public class EndpointDocumentation {
|
|
|
|
output = output.length() > 0 ? output : "./";
|
|
|
|
output = output.length() > 0 ? output : "./";
|
|
|
|
this.mockMvc
|
|
|
|
this.mockMvc
|
|
|
|
.perform(get(endpointPath)
|
|
|
|
.perform(get(endpointPath)
|
|
|
|
.accept(ActuatorMediaTypes.APPLICATION_ACTUATOR_V1_JSON))
|
|
|
|
.accept(ActuatorMediaTypes.APPLICATION_ACTUATOR_V2_JSON))
|
|
|
|
.andExpect(status().isOk()).andDo(document(output))
|
|
|
|
.andExpect(status().isOk()).andDo(document(output))
|
|
|
|
.andDo(new ResultHandler() {
|
|
|
|
.andDo(new ResultHandler() {
|
|
|
|
|
|
|
|
|
|
|
|