add codex cloud list (#9324)

for listing cloud tasks.
This commit is contained in:
Jeremy Rose
2026-01-16 08:56:38 -08:00
committed by GitHub
parent 9147df0e60
commit 4125c825f9
9 changed files with 259 additions and 23 deletions

View File

@@ -5,18 +5,23 @@ use codex_cloud_tasks_client::MockClient;
async fn mock_backend_varies_by_env() {
let client = MockClient;
let root = CloudBackend::list_tasks(&client, None).await.unwrap();
let root = CloudBackend::list_tasks(&client, None, None, None)
.await
.unwrap()
.tasks;
assert!(root.iter().any(|t| t.title.contains("Update README")));
let a = CloudBackend::list_tasks(&client, Some("env-A"))
let a = CloudBackend::list_tasks(&client, Some("env-A"), None, None)
.await
.unwrap();
.unwrap()
.tasks;
assert_eq!(a.len(), 1);
assert_eq!(a[0].title, "A: First");
let b = CloudBackend::list_tasks(&client, Some("env-B"))
let b = CloudBackend::list_tasks(&client, Some("env-B"), None, None)
.await
.unwrap();
.unwrap()
.tasks;
assert_eq!(b.len(), 2);
assert!(b[0].title.starts_with("B: "));
}