-
-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Don't upload chunks that are already on the server #1651
Changes from 6 commits
d44b9e8
544deef
ee57468
f0bab45
4879a36
6115378
6bb3c28
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ fn command_bundle_jvm_out_not_found_creates_dir() { | |
testcase_cwd_path.join("jvm"), | ||
) | ||
.unwrap(); | ||
let _upload_endpoints = mock_common_upload_endpoints(ServerBehavior::Legacy); | ||
let _upload_endpoints = mock_common_upload_endpoints(ServerBehavior::Legacy, vec![], None); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's fine for now, but keep in mind to maybe one day refactor it into an options struct, otherwise this args list can grooow and groow There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I refactored it, I think you're right that it's nicer with an options struct. |
||
register_test("debug_files/debug_files-bundle-jvm-output-not-found.trycmd"); | ||
} | ||
|
||
|
@@ -35,20 +35,20 @@ fn command_bundle_jvm_fails_out_is_file() { | |
} | ||
copy_recursively("tests/integration/_fixtures/jvm/", testcase_cwd_path).unwrap(); | ||
write(testcase_cwd_path.join("file.txt"), "some file content").unwrap(); | ||
let _upload_endpoints = mock_common_upload_endpoints(ServerBehavior::Legacy); | ||
let _upload_endpoints = mock_common_upload_endpoints(ServerBehavior::Legacy, vec![], None); | ||
|
||
register_test("debug_files/debug_files-bundle-jvm-output-is-file.trycmd"); | ||
} | ||
|
||
#[test] | ||
fn command_bundle_jvm_fails_input_not_found() { | ||
let _upload_endpoints = mock_common_upload_endpoints(ServerBehavior::Legacy); | ||
let _upload_endpoints = mock_common_upload_endpoints(ServerBehavior::Legacy, vec![], None); | ||
register_test("debug_files/debug_files-bundle-jvm-input-not-found.trycmd"); | ||
} | ||
|
||
#[test] | ||
fn command_bundle_jvm_fails_input_is_file() { | ||
let _upload_endpoints = mock_common_upload_endpoints(ServerBehavior::Legacy); | ||
let _upload_endpoints = mock_common_upload_endpoints(ServerBehavior::Legacy, vec![], None); | ||
register_test("debug_files/debug_files-bundle-jvm-input-is-file.trycmd"); | ||
} | ||
|
||
|
@@ -62,13 +62,13 @@ fn command_bundle_jvm_input_dir_empty() { | |
} | ||
copy_recursively("tests/integration/_fixtures/jvm/", testcase_cwd_path).unwrap(); | ||
create_dir(testcase_cwd_path.join("empty-dir")).unwrap(); | ||
let _upload_endpoints = mock_common_upload_endpoints(ServerBehavior::Legacy); | ||
let _upload_endpoints = mock_common_upload_endpoints(ServerBehavior::Legacy, vec![], None); | ||
register_test("debug_files/debug_files-bundle-jvm-input-dir-empty.trycmd"); | ||
} | ||
|
||
#[test] | ||
fn command_bundle_jvm_fails_invalid_uuid() { | ||
let _upload_endpoints = mock_common_upload_endpoints(ServerBehavior::Legacy); | ||
let _upload_endpoints = mock_common_upload_endpoints(ServerBehavior::Legacy, vec![], None); | ||
register_test("debug_files/debug_files-bundle-jvm-invalid-uuid.trycmd"); | ||
} | ||
|
||
|
@@ -79,6 +79,6 @@ fn command_bundle_jvm() { | |
remove_dir_all(testcase_cwd_path).unwrap(); | ||
} | ||
copy_recursively("tests/integration/_fixtures/jvm/", testcase_cwd_path).unwrap(); | ||
let _upload_endpoints = mock_common_upload_endpoints(ServerBehavior::Legacy); | ||
let _upload_endpoints = mock_common_upload_endpoints(ServerBehavior::Legacy, vec![], None); | ||
register_test("debug_files/debug_files-bundle-jvm.trycmd"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not worth it, but we might want to extract this (and another use above) into
use_artifact_bundle
or similar helper, to make sure it's always in sync in all places. But it's only repeated twice right now, so no need to move it yet imo.