Skip to content

Commit ccc1502

Browse files
test(cicd): add negative test for invalid sort value in flaky-tests search
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 570bbe0 commit ccc1502

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

src/test_commands.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,6 +1590,24 @@ async fn test_cicd_flaky_tests_search() {
15901590
cleanup_env();
15911591
}
15921592

1593+
#[tokio::test]
1594+
async fn test_cicd_flaky_tests_search_invalid_sort() {
1595+
let _lock = lock_env();
1596+
let s = mockito::Server::new_async().await;
1597+
let cfg = test_config(&s.url());
1598+
let result = crate::commands::cicd::flaky_tests_search(
1599+
&cfg,
1600+
None,
1601+
None,
1602+
10,
1603+
Some("bogus".into()),
1604+
)
1605+
.await;
1606+
assert!(result.is_err());
1607+
assert!(result.unwrap_err().to_string().contains("invalid sort value"));
1608+
cleanup_env();
1609+
}
1610+
15931611
// --- Fleet ---
15941612
#[tokio::test]
15951613
async fn test_fleet_agents_list() {

0 commit comments

Comments
 (0)