1.1.1: DiscInputs gains version; tests pull stride from inputs.version
This commit is contained in:
@@ -60,6 +60,7 @@ fn inputs(hash: &str) -> DiscInputs {
|
|||||||
DiscInputs {
|
DiscInputs {
|
||||||
disc_hash: hash.into(),
|
disc_hash: hash.into(),
|
||||||
volume_id: [0u8; 16],
|
volume_id: [0u8; 16],
|
||||||
|
version: libfreemkv::aacs::AACS_MAJOR_UHD,
|
||||||
mkb: Vec::new(),
|
mkb: Vec::new(),
|
||||||
unit_key_ro: Vec::new(),
|
unit_key_ro: Vec::new(),
|
||||||
samples: Vec::new(),
|
samples: Vec::new(),
|
||||||
@@ -69,7 +70,7 @@ fn inputs(hash: &str) -> DiscInputs {
|
|||||||
|
|
||||||
/// Resolve a source through the public trait over a `DiscInputsCtx`.
|
/// Resolve a source through the public trait over a `DiscInputsCtx`.
|
||||||
fn resolve(src: &dyn KeySource, inp: &DiscInputs) -> Vec<UnitKey> {
|
fn resolve(src: &dyn KeySource, inp: &DiscInputs) -> Vec<UnitKey> {
|
||||||
let ctx = DiscInputsCtx::new(inp, 2);
|
let ctx = DiscInputsCtx::new(inp);
|
||||||
src.get_uk(&ctx)
|
src.get_uk(&ctx)
|
||||||
.expect("get_uk must not error for these fixtures")
|
.expect("get_uk must not error for these fixtures")
|
||||||
}
|
}
|
||||||
@@ -127,7 +128,7 @@ fn keydb_source_missing_file_is_silent_ok_empty() {
|
|||||||
// source in the chain can still supply them.
|
// source in the chain can still supply them.
|
||||||
let src = KeydbSource::new("/nonexistent/path/keydb.cfg");
|
let src = KeydbSource::new("/nonexistent/path/keydb.cfg");
|
||||||
let inp = inputs(DISC_HASH);
|
let inp = inputs(DISC_HASH);
|
||||||
let ctx = DiscInputsCtx::new(&inp, 2);
|
let ctx = DiscInputsCtx::new(&inp);
|
||||||
assert!(
|
assert!(
|
||||||
src.get_uk(&ctx)
|
src.get_uk(&ctx)
|
||||||
.expect("missing keydb is Ok, not Err")
|
.expect("missing keydb is Ok, not Err")
|
||||||
|
|||||||
Reference in New Issue
Block a user