Skip to content

Commit

Permalink
Split storage box tests into a separate serial track to speed up runt…
Browse files Browse the repository at this point in the history
…ime.

Fix clippy warnings
  • Loading branch information
MathiasPius committed Apr 10, 2024
1 parent 842cf11 commit 7241112
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 17 deletions.
7 changes: 4 additions & 3 deletions src/api/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,10 @@ impl AsyncRobot {
/// # }
/// ```
pub async fn withdraw_server_cancellation(&self, server_number: ServerId) -> Result<(), Error> {
Ok(self
.go(withdraw_server_cancellation(server_number))
self.go(withdraw_server_cancellation(server_number))
.await?
.throw_away())
.throw_away();

Ok(())
}
}
2 changes: 0 additions & 2 deletions tests/keys.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
use hrobot::AsyncRobot;
use serial_test::file_serial;
use tracing::info;
use tracing_test::traced_test;

#[tokio::test]
#[traced_test]
#[file_serial]
async fn test_create_delete_key() {
let _ = dotenvy::dotenv().ok();

Expand Down
24 changes: 12 additions & 12 deletions tests/storagebox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use tracing_test::traced_test;

#[tokio::test]
#[traced_test]
#[file_serial]
#[file_serial(storagebox)]
async fn get_storageboxes() {
let _ = dotenvy::dotenv().ok();

Expand All @@ -28,7 +28,7 @@ async fn get_storageboxes() {

#[tokio::test]
#[traced_test]
#[file_serial]
#[file_serial(storagebox)]
async fn get_storagebox() {
let _ = dotenvy::dotenv().ok();

Expand All @@ -46,7 +46,7 @@ async fn get_storagebox() {

#[tokio::test]
#[traced_test]
#[file_serial]
#[file_serial(storagebox)]
async fn list_snapshots() {
let _ = dotenvy::dotenv().ok();

Expand All @@ -57,7 +57,7 @@ async fn list_snapshots() {

#[tokio::test]
#[traced_test]
#[file_serial]
#[file_serial(storagebox)]
async fn get_snapshotplans() {
let _ = dotenvy::dotenv().ok();

Expand All @@ -73,7 +73,7 @@ async fn get_snapshotplans() {

#[tokio::test]
#[traced_test]
#[file_serial]
#[file_serial(storagebox)]
async fn list_subaccounts() {
let _ = dotenvy::dotenv().ok();

Expand All @@ -94,7 +94,7 @@ async fn list_subaccounts() {

#[tokio::test]
#[traced_test]
#[file_serial]
#[file_serial(storagebox)]
async fn reset_password() {
let _ = dotenvy::dotenv().ok();

Expand All @@ -112,7 +112,7 @@ async fn reset_password() {

#[tokio::test]
#[traced_test]
#[file_serial]
#[file_serial(storagebox)]
async fn rename_storagebox() {
let _ = dotenvy::dotenv().ok();

Expand All @@ -129,7 +129,7 @@ async fn rename_storagebox() {

#[tokio::test]
#[traced_test]
#[file_serial]
#[file_serial(storagebox)]
async fn toggle_all_settings() {
let _ = dotenvy::dotenv().ok();

Expand Down Expand Up @@ -277,7 +277,7 @@ async fn toggle_all_settings() {

#[tokio::test]
#[traced_test]
#[file_serial]
#[file_serial(storagebox)]
async fn create_revert_delete_snapshot() {
let _ = dotenvy::dotenv().ok();

Expand Down Expand Up @@ -313,7 +313,7 @@ async fn create_revert_delete_snapshot() {

#[tokio::test]
#[traced_test]
#[file_serial]
#[file_serial(storagebox)]
async fn create_comment_delete_snapshot() {
let _ = dotenvy::dotenv().ok();

Expand Down Expand Up @@ -341,7 +341,7 @@ async fn create_comment_delete_snapshot() {

#[tokio::test]
#[traced_test]
#[file_serial]
#[file_serial(storagebox)]
async fn update_snapshot_plans() {
let _ = dotenvy::dotenv().ok();

Expand Down Expand Up @@ -398,7 +398,7 @@ async fn update_snapshot_plans() {

#[tokio::test]
#[traced_test]
#[file_serial]
#[file_serial(storagebox)]
async fn create_update_delete_subaccount() {
let _ = dotenvy::dotenv().ok();

Expand Down

0 comments on commit 7241112

Please sign in to comment.