Skip to content

Commit da8a642

Browse files
committed
Remove remaining provider & condition tests in aggregator database
1 parent bdb32f3 commit da8a642

File tree

2 files changed

+0
-39
lines changed

2 files changed

+0
-39
lines changed

mithril-aggregator/src/database/provider/certificate/delete_certificate.rs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -49,28 +49,3 @@ impl<'conn> DeleteCertificateProvider<'conn> {
4949
self.find(filters)
5050
}
5151
}
52-
53-
#[cfg(test)]
54-
mod tests {
55-
use sqlite::Connection;
56-
57-
use super::*;
58-
59-
#[test]
60-
fn delete_certificates_condition_correctly_joins_given_ids() {
61-
let connection = Connection::open_thread_safe(":memory:").unwrap();
62-
let provider = DeleteCertificateProvider::new(&connection);
63-
let condition = provider.get_delete_by_ids_condition(&["a", "b", "c"]);
64-
let (condition, params) = condition.expand();
65-
66-
assert_eq!("certificate_id in (?1, ?2, ?3)".to_string(), condition);
67-
assert_eq!(
68-
vec![
69-
Value::String("a".to_string()),
70-
Value::String("b".to_string()),
71-
Value::String("c".to_string()),
72-
],
73-
params
74-
);
75-
}
76-
}

mithril-aggregator/src/database/repository/certificate_repository.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -224,20 +224,6 @@ mod tests {
224224
assert_eq!(0, current_records.len());
225225
}
226226

227-
#[tokio::test]
228-
async fn master_certificate_condition() {
229-
let connection = Connection::open_thread_safe(":memory:").unwrap();
230-
let provider = MasterCertificateProvider::new(&connection);
231-
let condition = provider.get_master_certificate_condition(Epoch(10));
232-
let (condition_str, parameters) = condition.expand();
233-
234-
assert_eq!(
235-
"certificate.epoch between ?1 and ?2 and (certificate.parent_certificate_id is null or certificate.epoch != parent_certificate.epoch)".to_string(),
236-
condition_str
237-
);
238-
assert_eq!(vec![Value::Integer(9), Value::Integer(10)], parameters);
239-
}
240-
241227
#[tokio::test]
242228
async fn repository_get_certificate() {
243229
let (certificates, _) = setup_certificate_chain(5, 2);

0 commit comments

Comments
 (0)