Remove unnecessary enumeration in test
This commit is contained in:
parent
7f9f4fd99b
commit
8d335fe4d7
1 changed files with 4 additions and 4 deletions
|
@ -3,8 +3,8 @@ use std::sync::Arc;
|
||||||
use base64ct::Encoding;
|
use base64ct::Encoding;
|
||||||
use ct::{
|
use ct::{
|
||||||
merkle::{
|
merkle::{
|
||||||
consts::{EXTRA_DATA_BASE64_BUFFER_SIZE, LEAF_BASE64_BUFFER_SIZE},
|
consts::EXTRA_DATA_BASE64_BUFFER_SIZE,
|
||||||
types::{LogEntryType, MerkleLeafType, Version}
|
types::{MerkleLeafType, Version}
|
||||||
},
|
},
|
||||||
parsing::entry::{parse_entry_extra_data_precert, parse_entry_extra_data_x509}
|
parsing::entry::{parse_entry_extra_data_precert, parse_entry_extra_data_x509}
|
||||||
};
|
};
|
||||||
|
@ -50,7 +50,7 @@ async fn fetch_entries() -> impl Iterator<Item = Entry> {
|
||||||
async fn test_letsencrypt_2024h2_parsing() {
|
async fn test_letsencrypt_2024h2_parsing() {
|
||||||
let mut buffer = [0u8; EXTRA_DATA_BASE64_BUFFER_SIZE];
|
let mut buffer = [0u8; EXTRA_DATA_BASE64_BUFFER_SIZE];
|
||||||
|
|
||||||
for (i, entry) in fetch_entries().await.enumerate() {
|
for entry in fetch_entries().await {
|
||||||
// Parse leaf_input
|
// Parse leaf_input
|
||||||
buffer[..entry.leaf_input.len()].copy_from_slice(entry.leaf_input.as_bytes());
|
buffer[..entry.leaf_input.len()].copy_from_slice(entry.leaf_input.as_bytes());
|
||||||
let parsed =
|
let parsed =
|
||||||
|
@ -90,7 +90,7 @@ async fn test_letsencrypt_2024h2_parsing() {
|
||||||
parse_entry_extra_data(parsed).expect("extra_data should parse properly");
|
parse_entry_extra_data(parsed).expect("extra_data should parse properly");
|
||||||
|
|
||||||
// extra_data assertions
|
// extra_data assertions
|
||||||
assert_eq!(input.len(), 0, "All input should be parsed at entry {i}");
|
assert_eq!(input.len(), 0, "All input should be parsed");
|
||||||
match parsed {
|
match parsed {
|
||||||
ct::merkle::types::EntryExtraData::X509Certificate(chain) =>
|
ct::merkle::types::EntryExtraData::X509Certificate(chain) =>
|
||||||
assert_ne!(chain.len(), 0, "x509 chain should not be 0 length"),
|
assert_ne!(chain.len(), 0, "x509 chain should not be 0 length"),
|
||||||
|
|
Loading…
Reference in a new issue