Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: src/controllers/user/resend.rs
expression: app.emails_snapshot()
expression: app.emails_snapshot().await
snapshot_kind: text
---
To: foo@example.com
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: src/tests/krate/publish/basics.rs
expression: app.emails_snapshot()
expression: app.emails_snapshot().await
snapshot_kind: text
---
To: foo@example.com
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: src/tests/routes/me/tokens/create.rs
expression: app.emails_snapshot()
expression: app.emails_snapshot().await
snapshot_kind: text
---
To: foo@example.com
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: src/tests/routes/me/tokens/create.rs
expression: app.emails_snapshot()
expression: app.emails_snapshot().await
snapshot_kind: text
---
To: foo@example.com
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: src/tests/routes/me/tokens/create.rs
expression: app.emails_snapshot()
expression: app.emails_snapshot().await
snapshot_kind: text
---
To: foo@example.com
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: src/tests/routes/me/tokens/create.rs
expression: app.emails_snapshot()
expression: app.emails_snapshot().await
snapshot_kind: text
---
To: foo@example.com
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: src/tests/routes/users/update/publish_notifications.rs
expression: app.emails_snapshot()
expression: app.emails_snapshot().await
snapshot_kind: text
---
To: foo@example.com
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: src/tests/routes/users/update/publish_notifications.rs
expression: app.emails_snapshot()
expression: app.emails_snapshot().await
snapshot_kind: text
---
To: foo@example.com
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: src/tests/routes/users/update/publish_notifications.rs
expression: app.emails_snapshot()
expression: app.emails_snapshot().await
snapshot_kind: text
---
To: foo@example.com
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: src/tests/routes/users/update/publish_notifications.rs
expression: app.emails_snapshot()
expression: app.emails_snapshot().await
snapshot_kind: text
---
To: foo@example.com
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: src/tests/github_secret_scanning.rs
expression: app.emails_snapshot()
expression: app.emails_snapshot().await
snapshot_kind: text
---
To: foo@example.com
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: src/tests/owners.rs
expression: app.emails_snapshot()
expression: app.emails_snapshot().await
snapshot_kind: text
---
To: user2@example.com
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: src/tests/owners.rs
expression: app.emails_snapshot()
expression: app.emails_snapshot().await
snapshot_kind: text
---
To: user2@example.com
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: src/tests/owners.rs
expression: app.emails_snapshot()
expression: app.emails_snapshot().await
snapshot_kind: text
---
To: foo@example.com
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: src/tests/owners.rs
expression: app.emails_snapshot()
expression: app.emails_snapshot().await
snapshot_kind: text
---
To: foo@example.com
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: src/tests/team.rs
expression: app.emails_snapshot()
expression: app.emails_snapshot().await
snapshot_kind: text
---
To: user-all-teams@example.com
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
source: src/tests/worker/rss/sync_crate_feed.rs
expression: content
snapshot_kind: text
---
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:crates="https://crates.io/">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: src/tests/worker/sync_admins.rs
expression: app.emails_snapshot()
expression: app.emails_snapshot().await
snapshot_kind: text
---
To: existing-admin@crates.io
Expand Down
4 changes: 2 additions & 2 deletions src/worker/jobs/archive_version_downloads.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,13 +266,13 @@ mod tests {
export(&database_url, &csv_path, &before).await.unwrap();

let content = tokio::fs::read_to_string(&csv_path).await.unwrap();
assert_snapshot!(content, @r###"
assert_snapshot!(content, @r"
date,version_id,downloads
2021-01-01,1,100
2021-01-02,1,200
2021-01-01,2,400
2021-01-02,2,500
"###);
");
}

#[test]
Expand Down
8 changes: 4 additions & 4 deletions src/worker/jobs/downloads/process_log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -433,26 +433,26 @@ mod tests {
let store = store.clone();
run(store, CLOUDFRONT_PATH, db_pool.clone()).await
});
assert_debug_snapshot!(all_version_downloads(db_pool.clone()).await, @r###"
assert_debug_snapshot!(all_version_downloads(db_pool.clone()).await, @r#"
[
"bindgen | 0.65.1 | 1 | 0 | 2024-01-16 | false",
"quick-error | 1.2.3 | 2 | 0 | 2024-01-16 | false",
"quick-error | 1.2.3 | 1 | 0 | 2024-01-17 | false",
"tracing-core | 0.1.32 | 1 | 0 | 2024-01-16 | false",
]
"###);
"#);

// Check that processing the same log file again does not insert
// duplicate data.
assert_ok!(run(store, CLOUDFRONT_PATH, db_pool.clone()).await);
assert_debug_snapshot!(all_version_downloads(db_pool).await, @r###"
assert_debug_snapshot!(all_version_downloads(db_pool).await, @r#"
[
"bindgen | 0.65.1 | 1 | 0 | 2024-01-16 | false",
"quick-error | 1.2.3 | 2 | 0 | 2024-01-16 | false",
"quick-error | 1.2.3 | 1 | 0 | 2024-01-17 | false",
"tracing-core | 0.1.32 | 1 | 0 | 2024-01-16 | false",
]
"###);
"#);
}

#[test]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
source: src/worker/jobs/rss/sync_crate_feed.rs
expression: "updates.iter().map(|u| &u.version).collect::<Vec<_>>()"
snapshot_kind: text
---
[
"1.2.10",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
source: src/worker/jobs/rss/sync_crate_feed.rs
expression: "updates.iter().map(|u| &u.version).collect::<Vec<_>>()"
snapshot_kind: text
---
[
"1.3.20",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
source: src/worker/jobs/rss/sync_crate_feed.rs
expression: "updates.iter().map(|u| &u.version).collect::<Vec<_>>()"
snapshot_kind: text
---
[
"1.2.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
source: src/worker/jobs/rss/sync_updates_feed.rs
expression: "updates.iter().map(|u| &u.version).collect::<Vec<_>>()"
snapshot_kind: text
---
[
"1.2.100",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
source: src/worker/jobs/rss/sync_updates_feed.rs
expression: "updates.iter().map(|u| &u.version).collect::<Vec<_>>()"
snapshot_kind: text
---
[
"1.3.110",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
source: src/worker/jobs/rss/sync_updates_feed.rs
expression: "updates.iter().map(|u| &u.version).collect::<Vec<_>>()"
snapshot_kind: text
---
[
"1.2.0",
Expand Down