api test: a failed seed reads the fault's own fixed words
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
e9612e4305
commit
964be6db44
1 changed files with 6 additions and 6 deletions
|
|
@ -1285,20 +1285,20 @@ mod tests {
|
|||
.await;
|
||||
}
|
||||
|
||||
/// Spec test: a scripted seed fault reads Failed with a reason and no
|
||||
/// endpoint text.
|
||||
/// Spec test: a scripted seed fault reads Failed with the fault's own fixed
|
||||
/// words.
|
||||
#[tokio::test]
|
||||
async fn a_failed_seed_reads_failed_with_a_reason_and_no_endpoint() {
|
||||
async fn a_failed_seed_reads_failed_with_the_faults_own_reason() {
|
||||
let app = app_over(deferred_rig(), &["alice"]).await;
|
||||
let cookie = app.cookies[0].clone();
|
||||
let timeline = begin_vault_over_http(&app, &cookie).await;
|
||||
app.rig.port.push(Err("http://10.0.0.7:9/secret endpoint down"));
|
||||
app.rig.port.push(Err("the connector does not allow the requested model"));
|
||||
let (_, reason) = eventually(async || {
|
||||
timeline_status(&app, &cookie, &timeline).await.filter(|(state, _)| state == "failed")
|
||||
})
|
||||
.await;
|
||||
let reason = reason.as_str().unwrap();
|
||||
assert!(reason.contains("seed") && !reason.contains("10.0.0.7"), "{reason}");
|
||||
assert!(reason.contains("seed") && reason.contains("the connector does not allow the requested model"), "{reason}");
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1315,7 +1315,7 @@ mod tests {
|
|||
assert_eq!((status, body["status"].as_str()), (StatusCode::CONFLICT, Some("seeding")), "{body}");
|
||||
assert_eq!(body["error"], "this world is still being seeded");
|
||||
|
||||
app.rig.port.push(Err("http://10.0.0.7:9/secret endpoint down"));
|
||||
app.rig.port.push(Err("the connector does not allow the requested model"));
|
||||
eventually(async || timeline_status(&app, &cookie, &timeline).await.filter(|(state, _)| state == "failed")).await;
|
||||
let (status, body) = play_text(&app, &cookie, &timeline, "I look around.", None).await;
|
||||
assert_eq!((status, body["status"].as_str()), (StatusCode::CONFLICT, Some("failed")), "{body}");
|
||||
|
|
|
|||
Loading…
Reference in a new issue