Compare commits
2 commits
9dd2da3cc4
...
0a4019ea19
| Author | SHA1 | Date | |
|---|---|---|---|
| 0a4019ea19 | |||
| 59253eadb1 |
2 changed files with 23 additions and 2 deletions
|
|
@ -161,7 +161,7 @@ impl<D: Clone> SymbolBuilder<KeyAndCertBundle<D>> for DefaultBuilder {
|
|||
target: &<KeyAndCertBundle<D> as Resource>::Artifact,
|
||||
(cert_chain, key): <Self::Prerequisites as ToArtifact>::Artifact,
|
||||
) -> Self::Symbol {
|
||||
ConcatSymbol::new([cert_chain.0, key.0], target.0.clone())
|
||||
ConcatSymbol::new([key.0, cert_chain.0], target.0.clone())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
23
src/setup.rs
23
src/setup.rs
|
|
@ -128,7 +128,9 @@ macro_rules! runnable_for_tuple {
|
|||
#[allow(unused)]
|
||||
fn run<_R: SymbolRunner>(&self, runner: &_R, force: bool) -> Result<bool, Box<dyn Error>> {
|
||||
let ($($name,)*) = self;
|
||||
Ok($(runner.run_symbol($name, force)? || )* false)
|
||||
let mut result = false;
|
||||
$(result = runner.run_symbol($name, force)? || result;)*
|
||||
Ok(result)
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
@ -342,4 +344,23 @@ mod test {
|
|||
setup.add(TestResource("A", "B")).unwrap();
|
||||
assert_eq!(*count.borrow(), 0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn correctly_handles_symbol_tuples() {
|
||||
let (count, setup) = get_setup();
|
||||
setup.run_symbol((TestSymbol { reached: false }, TestSymbol { reached: false }), false).unwrap();
|
||||
assert_eq!(*count.borrow(), 2);
|
||||
|
||||
let (count, setup) = get_setup();
|
||||
setup.run_symbol((TestSymbol { reached: true }, TestSymbol { reached: false }), false).unwrap();
|
||||
assert_eq!(*count.borrow(), 1);
|
||||
|
||||
let (count, setup) = get_setup();
|
||||
setup.run_symbol((TestSymbol { reached: false }, TestSymbol { reached: true }), false).unwrap();
|
||||
assert_eq!(*count.borrow(), 1);
|
||||
|
||||
let (count, setup) = get_setup();
|
||||
setup.run_symbol((TestSymbol { reached: true }, TestSymbol { reached: true }), true).unwrap();
|
||||
assert_eq!(*count.borrow(), 2);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue