Skip to content

Commit

Permalink
Bump rustls-webpki from 0.101.3 to 0.101.7 (#42)
Browse files Browse the repository at this point in the history
* Bump rustls-webpki from 0.101.3 to 0.101.7

Bumps [rustls-webpki](https://github.com/rustls/webpki) from 0.101.3 to 0.101.7.
- [Release notes](https://github.com/rustls/webpki/releases)
- [Commits](rustls/webpki@v/0.101.3...v/0.101.7)

---
updated-dependencies:
- dependency-name: rustls-webpki
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update sqlite.rs

* format code

* adjust test imports

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Stürmer <[email protected]>
  • Loading branch information
dependabot[bot] and thebino committed Oct 26, 2023
1 parent d3da665 commit 1b948d1
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 27 deletions.
40 changes: 30 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 10 additions & 14 deletions crates/database/src/sqlite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ mod tests {
let user_id = "570DC079-664A-4496-BAA3-668C445A447";
// create fake user - used as FOREIGN KEY in media
sqlx::query("INSERT INTO users (uuid, email, password, lastname, firstname) VALUES ($1, $2, $3, $4, $5)")
.bind(user_id.clone())
.bind(user_id)
.bind("[email protected]")
.bind("unsecure")
.bind("Stuermer")
Expand All @@ -436,9 +436,7 @@ mod tests {
let date_taken = OffsetDateTime::now_utc();

// when
let media_item_result = db
.create_media_item(user_id.clone(), name, date_taken)
.await;
let media_item_result = db.create_media_item(user_id, name, date_taken).await;

// then
assert!(media_item_result.is_ok());
Expand All @@ -459,16 +457,16 @@ mod tests {

// create fake user - used as FOREIGN KEY in media
sqlx::query("INSERT INTO users (uuid, email, password, lastname, firstname) VALUES ($1, $2, $3, $4, $5)")
.bind(user_id.clone())
.bind(user_id)
.bind("[email protected]")
.bind("unsecure")
.bind("Stuermer")
.bind("Benjamin")
.execute(&pool).await?;

sqlx::query("INSERT INTO media (uuid, owner, name, is_sensitive, added_at, taken_at) VALUES ($1, $2, $3, $4, $5, $6)")
.bind(media_id.clone())
.bind(user_id.clone())
.bind(media_id)
.bind(user_id)
.bind("DSC_1234")
.bind(false)
.bind(added_at)
Expand All @@ -481,7 +479,7 @@ mod tests {
.await;

// when
let media_item_result = db.create_media_item(user_id.clone(), name, taken_at).await;
let media_item_result = db.create_media_item(user_id, name, taken_at).await;

// then
assert!(media_item_result.is_ok());
Expand All @@ -501,16 +499,16 @@ mod tests {
let taken_at = OffsetDateTime::parse("2023-01-01T13:37:01.234567Z", &Rfc3339).unwrap();
// create fake user - used as FOREIGN KEY in reference
sqlx::query("INSERT INTO users (uuid, email, password, lastname, firstname) VALUES ($1, $2, $3, $4, $5)")
.bind(user_id.clone())
.bind(user_id)
.bind("[email protected]")
.bind("unsecure")
.bind("Stuermer")
.bind("Benjamin")
.execute(&pool).await?;
// create fake media item - used as FOREIGN KEY in reference
sqlx::query("INSERT INTO media (uuid, owner, name, is_sensitive, added_at, taken_at) VALUES ($1, $2, $3, $4, $5, $6)")
.bind(media_id.clone())
.bind(user_id.clone())
.bind(media_id)
.bind(user_id)
.bind("DSC_1234")
.bind(false)
.bind(added_at)
Expand Down Expand Up @@ -539,9 +537,7 @@ mod tests {
};

// when
let add_reference_result = db
.add_reference(user_id.clone(), media_id.clone(), &reference)
.await;
let add_reference_result = db.add_reference(user_id, media_id, &reference).await;

// then
assert!(add_reference_result.is_ok());
Expand Down
1 change: 0 additions & 1 deletion crates/media/src/api/routes/post_media.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ mod tests {

use crate::api::router::MediaApi;
use axum::http::header::CONTENT_TYPE;
use hyper::header::CONNECTION;
use std::io::Write;
use std::path::PathBuf;
use testdir::testdir;
Expand Down
4 changes: 2 additions & 2 deletions crates/media/src/repository.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ mod tests {
// given
let user_id = "605EE8BE-BAF2-4499-B8D4-BA8C74E8B242";
sqlx::query("INSERT INTO users (uuid, email, password, lastname, firstname) VALUES ($1, $2, $3, $4, $5)")
.bind(user_id.clone())
.bind(user_id)
.bind("[email protected]")
.bind("unsecure")
.bind("Stuermer")
Expand All @@ -188,7 +188,7 @@ mod tests {
sqlx::query("INSERT INTO media (uuid, name, owner) VALUES ($1, $2, $3)")
.bind("6A92460C-53FB-4B42-AC1B-E6760A34E169")
.bind("DSC_1234")
.bind(user_id.clone())
.bind(user_id)
.execute(&pool)
.await?;

Expand Down

0 comments on commit 1b948d1

Please sign in to comment.