Eliminato chatgpt_base_url (B)
Da 24a3cfe2: via la chiave chatgpt_base_url e l'URL predefinito https://chatgpt.com/backend-api/
(la chiave resta accettata nei config e ignorata); schemi dell'app-server rigenerati.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
use anyhow::Result;
|
||||
use app_test_support::MockResponsesConfig;
|
||||
use app_test_support::TestAppServer;
|
||||
use app_test_support::write_api_key_auth;
|
||||
use app_test_support::write_models_cache;
|
||||
use akode_app_server_protocol::ThreadStartParams;
|
||||
use akode_app_server_protocol::TurnCompletedNotification;
|
||||
@@ -14,51 +13,6 @@ use pretty_assertions::assert_eq;
|
||||
use std::time::Duration;
|
||||
use tempfile::TempDir;
|
||||
use tokio::time::timeout;
|
||||
use wiremock::Mock;
|
||||
use wiremock::MockServer;
|
||||
use wiremock::ResponseTemplate;
|
||||
use wiremock::matchers::method;
|
||||
use wiremock::matchers::path;
|
||||
|
||||
#[tokio::test]
|
||||
async fn standalone_startup_applies_local_policy_before_fetching_stored_account_requirements()
|
||||
-> Result<()> {
|
||||
let backend = MockServer::start().await;
|
||||
let bundle_path = "/backend-api/wham/config/bundle";
|
||||
Mock::given(method("GET"))
|
||||
.and(path(bundle_path))
|
||||
.respond_with(ResponseTemplate::new(200).set_body_json(serde_json::json!({})))
|
||||
.expect(0)
|
||||
.mount(&backend)
|
||||
.await;
|
||||
let home = TempDir::new()?;
|
||||
std::fs::write(
|
||||
home.path().join("config.toml"),
|
||||
format!(
|
||||
"chatgpt_base_url = '{}/backend-api/'\ncli_auth_credentials_store = 'file'\n",
|
||||
backend.uri()
|
||||
),
|
||||
)?;
|
||||
std::fs::write(
|
||||
home.path().join("requirements.toml"),
|
||||
"[application.network]",
|
||||
)?;
|
||||
write_api_key_auth(home.path())?;
|
||||
let _app = TestAppServer::builder()
|
||||
.with_codex_home(home.path())
|
||||
.with_env_overrides(&[("OPENAI_API_KEY", None)])
|
||||
.build_initialized()
|
||||
.await?;
|
||||
assert!(
|
||||
backend
|
||||
.received_requests()
|
||||
.await
|
||||
.unwrap()
|
||||
.iter()
|
||||
.all(|request| request.url.path() != bundle_path)
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
async fn explicit_reloads_apply_local_edits_and_cancel_active_responses() -> Result<()> {
|
||||
|
||||
Reference in New Issue
Block a user