Skip to content

Commit 9da5cdb

Browse files
committed
feat: EnableCallRecordingAndBackstageMode integration test
1 parent 7c7fd00 commit 9da5cdb

1 file changed

Lines changed: 61 additions & 0 deletions

File tree

src/test/java/io/getstream/VideoIntegrationTest.java

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -817,6 +817,67 @@ void testExternalStorageOperations() throws Exception {
817817
}
818818
}
819819

820+
@Test
821+
@Order(16)
822+
void testEnableCallRecordingAndBackstageMode() throws Exception {
823+
// Create a call
824+
String callId = "test-call-" + RandomStringUtils.randomAlphabetic(8).toLowerCase();
825+
createdCallIds.add(callId);
826+
827+
video
828+
.getOrCreateCall(
829+
"default",
830+
callId,
831+
GetOrCreateCallRequest.builder()
832+
.data(CallRequest.builder().createdByID(testUsers.get(0).getId()).build())
833+
.build())
834+
.execute();
835+
836+
// Enable recording (available mode, audio only)
837+
var recordingResp =
838+
video
839+
.updateCall(
840+
"default",
841+
callId,
842+
UpdateCallRequest.builder()
843+
.settingsOverride(
844+
CallSettingsRequest.builder()
845+
.recording(
846+
RecordSettingsRequest.builder()
847+
.mode("available")
848+
.audioOnly(true)
849+
.build())
850+
.build())
851+
.build())
852+
.execute();
853+
854+
assertNotNull(recordingResp.getData());
855+
assertNotNull(recordingResp.getData().getCall());
856+
assertNotNull(recordingResp.getData().getCall().getSettings());
857+
assertNotNull(recordingResp.getData().getCall().getSettings().getRecording());
858+
assertEquals("available", recordingResp.getData().getCall().getSettings().getRecording().getMode());
859+
860+
// Enable backstage mode
861+
var backstageResp =
862+
video
863+
.updateCall(
864+
"default",
865+
callId,
866+
UpdateCallRequest.builder()
867+
.settingsOverride(
868+
CallSettingsRequest.builder()
869+
.backstage(BackstageSettingsRequest.builder().enabled(true).build())
870+
.build())
871+
.build())
872+
.execute();
873+
874+
assertNotNull(backstageResp.getData());
875+
assertNotNull(backstageResp.getData().getCall());
876+
assertNotNull(backstageResp.getData().getCall().getSettings());
877+
assertNotNull(backstageResp.getData().getCall().getSettings().getBackstage());
878+
assertTrue(backstageResp.getData().getCall().getSettings().getBackstage().getEnabled());
879+
}
880+
820881
@Test
821882
@Order(14)
822883
void testTeams() throws Exception {

0 commit comments

Comments
 (0)