|
@@ -155,7 +155,8 @@ class CockpitVideoControllerTest {
|
|
|
.andExpect(jsonPath("$.data.empty").value(false))
|
|
.andExpect(jsonPath("$.data.empty").value(false))
|
|
|
.andExpect(jsonPath("$.data.records[0].name").value("通道01"))
|
|
.andExpect(jsonPath("$.data.records[0].name").value("通道01"))
|
|
|
.andExpect(jsonPath("$.data.records[0].startTime").value("2026-11-10 01:00:00"))
|
|
.andExpect(jsonPath("$.data.records[0].startTime").value("2026-11-10 01:00:00"))
|
|
|
- .andExpect(jsonPath("$.data.records[0].endTime").value("2026-11-10 02:00:00"));
|
|
|
|
|
|
|
+ .andExpect(jsonPath("$.data.records[0].endTime").value("2026-11-10 02:00:00"))
|
|
|
|
|
+ .andExpect(jsonPath("$.data.records[0].type").value("time"));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
@Test
|
|
@@ -270,7 +271,7 @@ class CockpitVideoControllerTest {
|
|
|
"GET,/devices/remove", "GET,/record", "POST,/device", "PUT,/live", "DELETE,/live",
|
|
"GET,/devices/remove", "GET,/record", "POST,/device", "PUT,/live", "DELETE,/live",
|
|
|
"POST,/sessions/example/control", "POST,/ptz", "POST,/playback/control", "POST,/devices",
|
|
"POST,/sessions/example/control", "POST,/ptz", "POST,/playback/control", "POST,/devices",
|
|
|
"POST,/sessions/example/nested/stop", "POST,/live/nested"})
|
|
"POST,/sessions/example/nested/stop", "POST,/live/nested"})
|
|
|
- void onlyTheSixPublishedMethodAndPathPairsAreAnonymous(String method, String path) throws Exception {
|
|
|
|
|
|
|
+ void unpublishedVideoMethodAndPathPairsRequireAuthentication(String method, String path) throws Exception {
|
|
|
mvc.perform(request(org.springframework.http.HttpMethod.valueOf(method), ROOT + path))
|
|
mvc.perform(request(org.springframework.http.HttpMethod.valueOf(method), ROOT + path))
|
|
|
.andExpect(status().isUnauthorized()).andExpect(jsonPath("$.code").value(401));
|
|
.andExpect(status().isUnauthorized()).andExpect(jsonPath("$.code").value(401));
|
|
|
verifyNoInteractions(devices, bindings, sessions, collector);
|
|
verifyNoInteractions(devices, bindings, sessions, collector);
|