Skip to content

Commit

Permalink
Remove out of date comment and empty test
Browse files Browse the repository at this point in the history
  • Loading branch information
TheButlah committed May 9, 2024
1 parent 23dd51e commit 3e17088
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
16 changes: 12 additions & 4 deletions hil/src/download_s3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ fn download_using_awscli(url: &str, out_path: &Utf8Path) -> Result<()> {

/// Calculates the filename based on the s3 url.
pub fn parse_filename(url: &str) -> Result<String> {
// TODO: actually compute this
let expected_prefix = "s3://worldcoin-orb-update-packages-stage/worldcoin/orb-os/";
let path = url
.strip_prefix(expected_prefix)
Expand All @@ -60,9 +59,18 @@ mod test {
#[test]
fn test_parse() -> color_eyre::Result<()> {
let examples = [
("s3://worldcoin-orb-update-packages-stage/worldcoin/orb-os/2024-05-07-heads-main-0-g4b8aae5/rts/rts-dev.tar.zst", "2024-05-07-heads-main-0-g4b8aae5-rts-dev.tar.zst"),
("s3://worldcoin-orb-update-packages-stage/worldcoin/orb-os/2024-05-08-remotes-pull-386-merge-0-geea20f1/rts/rts-prod.tar.zst","2024-05-08-remotes-pull-386-merge-0-geea20f1-rts-prod.tar.zst"),
("s3://worldcoin-orb-update-packages-stage/worldcoin/orb-os/2024-05-08-tags-release-5.0.39-0-ga12b3d7/rts/rts-dev.tar.zst", "2024-05-08-tags-release-5.0.39-0-ga12b3d7-rts-dev.tar.zst"),
(
"s3://worldcoin-orb-update-packages-stage/worldcoin/orb-os/2024-05-07-heads-main-0-g4b8aae5/rts/rts-dev.tar.zst",
"2024-05-07-heads-main-0-g4b8aae5-rts-dev.tar.zst"
),
(
"s3://worldcoin-orb-update-packages-stage/worldcoin/orb-os/2024-05-08-remotes-pull-386-merge-0-geea20f1/rts/rts-prod.tar.zst",
"2024-05-08-remotes-pull-386-merge-0-geea20f1-rts-prod.tar.zst"
),
(
"s3://worldcoin-orb-update-packages-stage/worldcoin/orb-os/2024-05-08-tags-release-5.0.39-0-ga12b3d7/rts/rts-dev.tar.zst",
"2024-05-08-tags-release-5.0.39-0-ga12b3d7-rts-dev.tar.zst"
),
];
for (url, expected_filename) in examples {
assert_eq!(parse_filename(url)?, expected_filename);
Expand Down
5 changes: 0 additions & 5 deletions hil/src/flash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,3 @@ fn flash_cmd(variant: FlashVariant, extracted_dir: &Path) -> Result<()> {
.with_note(|| format!("bootloader_dir was {bootloader_dir:?}"))?;
Ok(())
}

#[cfg(test)]
mod test {
use super::*;
}

0 comments on commit 3e17088

Please sign in to comment.