test fix
This commit is contained in:
1 parent
317025087d
commit
a049147149
3 files changed
+9
-7
No files matched your search
@@ -28,7 +28,7 @@ namespace Tests
|
|||||||
"canRenew": false
|
"canRenew": false
|
||||||
})
|
})
|
||||||
m.assertEqual(parsed.license.ToHexString(), "010203FBFF")
|
m.assertEqual(parsed.license.ToHexString(), "010203FBFF")
|
||||||
m.assertEqual(parsed.payload, { "responseContext": responseContext, "status": "LICENSE_STATUS_OK", "authorizedFormats": authorizedFormats, "canRenew": false })
|
m.assertEqual(FormatJson(parsed.payload), FormatJson({ "responseContext": responseContext, "status": "LICENSE_STATUS_OK", "authorizedFormats": authorizedFormats, "canRenew": false }))
|
||||||
end function
|
end function
|
||||||
|
|
||||||
@it("a license that decodes to no bytes is an error, with the response as sent")
|
@it("a license that decodes to no bytes is an error, with the response as sent")
|
||||||
|
|||||||
@@ -303,7 +303,7 @@ namespace Tests
|
|||||||
requests = { "sent": 2, "responses": [{ "error": "timeout" }, { "payload": { "status": "LICENSE_STATUS_OK", "authorizedFormats": [{ "trackType": "DRM_TRACK_TYPE_SD", "keyId": "a" }] } }] }
|
requests = { "sent": 2, "responses": [{ "error": "timeout" }, { "payload": { "status": "LICENSE_STATUS_OK", "authorizedFormats": [{ "trackType": "DRM_TRACK_TYPE_SD", "keyId": "a" }] } }] }
|
||||||
VideoLoadHandoff.Write(DRM_LICENSE_REQUESTS_PATH, "load1", requests)
|
VideoLoadHandoff.Write(DRM_LICENSE_REQUESTS_PATH, "load1", requests)
|
||||||
summary = m.SendAt(1000)
|
summary = m.SendAt(1000)
|
||||||
m.assertEqual(summary.drm_license_requests, requests)
|
m.assertEqual(FormatJson(summary.drm_license_requests), FormatJson(requests))
|
||||||
m.assertEqual(summary.widevine_security_level, CreateObject("roDeviceInfo").GetDrmInfoEx().Widevine.securityLevel)
|
m.assertEqual(summary.widevine_security_level, CreateObject("roDeviceInfo").GetDrmInfoEx().Widevine.securityLevel)
|
||||||
m.assertFalse(m.SendAt(2000).DoesExist("drm_license_requests"), "read once")
|
m.assertFalse(m.SendAt(2000).DoesExist("drm_license_requests"), "read once")
|
||||||
end function
|
end function
|
||||||
|
|||||||
@@ -79,15 +79,17 @@ process.on('uncaughtException', (error, origin) => {
|
|||||||
await rokuDeploy.publish(options);
|
await rokuDeploy.publish(options);
|
||||||
|
|
||||||
console.log('Waiting for test to finish');
|
console.log('Waiting for test to finish');
|
||||||
let data = withoutQuotedLines(await readFromTelnetUntil(telnet, timeout));
|
const consoleOutput = withoutQuotedLines(await readFromTelnetUntil(telnet, timeout));
|
||||||
|
const data = reportOnly ? parseTestReport(consoleOutput) : consoleOutput;
|
||||||
if (reportOnly) {
|
|
||||||
data = parseTestReport(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
fs.writeFileSync(outputFile, data);
|
fs.writeFileSync(outputFile, data);
|
||||||
|
|
||||||
success = data.includes('RESULT: Success');
|
success = data.includes('RESULT: Success');
|
||||||
|
// Rooibos stops comparing past a fixed nesting depth and counts the rest as equal.
|
||||||
|
if (consoleOutput.includes('REACHED MAX ITERATIONS DOING COMPARISON')) {
|
||||||
|
console.error('An assertEqual nests deeper than Rooibos compares; compare FormatJson strings instead.');
|
||||||
|
success = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|||||||
Reference in new issue
Block a user