Skip to content

Commit fbcfe9a

Browse files
stephentoubCopilot
andcommitted
Fix Rust listFiles E2E order assertion
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 4566251 commit fbcfe9a

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

rust/tests/e2e/rpc_additional_edge_cases.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -428,10 +428,10 @@ async fn permissions_set_approve_all_toggle_round_trips() {
428428
}
429429

430430
#[tokio::test]
431-
async fn workspaces_createfile_then_listfiles_returns_sorted_or_stable_order() {
431+
async fn workspaces_createfile_then_listfiles_returns_all_files() {
432432
with_e2e_context(
433433
"rpc_additional_edge_cases",
434-
"workspaces_createfile_then_listfiles_returns_sorted_or_stable_order",
434+
"workspaces_createfile_then_listfiles_returns_all_files",
435435
|ctx| {
436436
Box::pin(async move {
437437
ctx.set_default_copilot_user();
@@ -465,9 +465,10 @@ async fn workspaces_createfile_then_listfiles_returns_sorted_or_stable_order() {
465465
.list_files()
466466
.await
467467
.expect("list files again");
468-
assert_eq!(first.files, second.files);
469-
for expected in ["a-rust.txt", "b-rust.txt", "c-rust.txt"] {
470-
assert!(first.files.iter().any(|file| file == expected));
468+
for files in [&first.files, &second.files] {
469+
for expected in ["a-rust.txt", "b-rust.txt", "c-rust.txt"] {
470+
assert!(files.iter().any(|file| file == expected));
471+
}
471472
}
472473

473474
session.disconnect().await.expect("disconnect session");

0 commit comments

Comments
 (0)