Skip to content

Commit

Permalink
Remove ci specific fixtures because they aren't needed anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmerlin authored and jihchi committed Oct 4, 2024
1 parent 18d81fb commit ae24128
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 20 deletions.
Binary file removed benches/fixtures/CI/test_block_out_area-diff.png
Binary file not shown.
Binary file removed benches/fixtures/CI/test_output_image-diff.png
Binary file not shown.
23 changes: 3 additions & 20 deletions tests/e2e.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ fn test_identical_image() {

#[test]
fn test_different_image() {
let running_on_ci = std::env::var_os("CI").is_some();
let output = NamedTempFile::new("test_different_image-diff.png").unwrap();
let mut cmd = Command::cargo_bin("dify").unwrap();
let assert = cmd
Expand All @@ -102,13 +101,7 @@ fn test_different_image() {

assert.assert().code(match consts::OS {
"windows" => 7787,
"linux" | "macos" | _ => {
if running_on_ci {
107
} else {
106
}
}
"linux" | "macos" | _ => 106,
});

output.close().unwrap();
Expand All @@ -129,12 +122,7 @@ fn test_output_image() {

assert.assert().failure();
output.assert(predicate::path::eq_file(
fs::canonicalize(if running_on_ci {
"./benches/fixtures/CI/test_output_image-diff.png"
} else {
"./benches/fixtures/test_output_image-diff.png"
})
.unwrap(),
fs::canonicalize("./benches/fixtures/test_output_image-diff.png").unwrap(),
));

output.close().unwrap();
Expand Down Expand Up @@ -199,12 +187,7 @@ fn test_block_out_area() {

assert.assert().failure();
output.assert(predicate::path::eq_file(
fs::canonicalize(if running_on_ci {
"./benches/fixtures/CI/test_block_out_area-diff.png"
} else {
"./benches/fixtures/test_block_out_area-diff.png"
})
.unwrap(),
fs::canonicalize("./benches/fixtures/test_block_out_area-diff.png").unwrap(),
));

output.close().unwrap();
Expand Down

0 comments on commit ae24128

Please sign in to comment.