Skip to content

Commit ee0b47e

Browse files
committed
add video device condition for non-CI env
1 parent a7bbca2 commit ee0b47e

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

tests/osn-tests/src/test_osn_video.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,5 +201,8 @@ describe(testName, () => {
201201
expect(device).to.have.property('description');
202202
logInfo(testName, `Output Video Device Found: ${device.description} with id: ${device.id}`);
203203
}
204+
if (!obs.isCI()) { // On CI the list of video devices is empty since there is no GPU. Just check that we got an array back and not worry about the contents
205+
expect(devices.length).to.be.greaterThan(0, GetErrorMessage(ETestErrorMsg.VideoDevicesEmpty));
206+
}
204207
});
205208
});

tests/osn-tests/util/error_messages.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ export const enum ETestErrorMsg {
205205
DefaultDeviceNotFound = 'Did not find the default audio device in the list of audio devices',
206206
VideoDevices = 'Failed to get video devices',
207207
VideoDevicesIsArray = 'Returned video devices value is not an array',
208+
VideoDevicesEmpty = 'Returned video devices array is empty',
208209
}
209210

210211
export function GetErrorMessage(message: string, value1?: string, value2?: string, value3?: string): string {

0 commit comments

Comments
 (0)