From 74da003a8a487e8ce4d68b0e30423c69036fa44d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xory=20=E2=80=8B?= Date: Thu, 18 Apr 2024 11:34:28 +0000 Subject: [PATCH 1/3] fix: att 1 --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 88fa359..e97d6ba 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -16,7 +16,7 @@ fn get_block_devices() -> Vec { if output.status.success() { output_str = String::from_utf8(output.stdout).unwrap(); block_devices = output_str.lines() - .filter(|line| !line.starts_with('|') && !line.starts_with('├') && !line.starts_with('└')) + .filter(|line| !line.starts_with('|') && !line.starts_with('├') && !line.starts_with('└') && !line.starts_with('-')) .map(|line| line.to_string()) .collect(); } @@ -68,6 +68,6 @@ mod tests { #[test] fn test_disk_locator() { - assert_eq!(get_block_devices(), vec!["vda".to_string()]) // Don't worry! This is *supposed* to not pass CI/CD. It should only be tested on QEMU/KVM Virtual Machines. + assert_eq!(get_block_devices(), vec!["vda".to_string()] || vec!["sda".to_string()]) // Don't worry! This is *supposed* to not pass CI/CD. It should only be tested on QEMU/KVM Virtual Machines. } } From 3dff775301cff30485c8d25027cdaec7fcb80be1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xory=20=E2=80=8B?= Date: Thu, 18 Apr 2024 11:35:25 +0000 Subject: [PATCH 2/3] feat: re-enable unit test in ci/cd as it is possible to make it pass --- .gitlab-ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bc9dee4..a59d5de 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,3 +22,8 @@ build:cargo: script: - rustc --version && cargo --version - cargo build + +test:cargo: + script: + - rustc --version && cargo --version + - cargo test \ No newline at end of file From 81156d71d7b3d5e02e8a9743a6662b11dc224188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xory=20=E2=80=8B?= Date: Thu, 18 Apr 2024 11:49:15 +0000 Subject: [PATCH 3/3] Revert "feat: re-enable unit test in ci/cd as it is possible to make it pass" This reverts commit 3dff775301cff30485c8d25027cdaec7fcb80be1 --- .gitlab-ci.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a59d5de..bc9dee4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,8 +22,3 @@ build:cargo: script: - rustc --version && cargo --version - cargo build - -test:cargo: - script: - - rustc --version && cargo --version - - cargo test \ No newline at end of file