mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
Refactor config types into a separate crate (#16962)
Move config types into a separate crate because their macros expand into a lot of new code.
This commit is contained in:
1 parent
d2df7c54b2
commit
1f2411629f
90 files changed
+1356
-1261
No files matched your search
@@ -198,16 +198,11 @@ fn enable_fanout_normalization_enables_multi_agent_one_way() {
|
||||
#[test]
|
||||
fn apps_require_feature_flag_and_chatgpt_auth() {
|
||||
let mut features = Features::with_defaults();
|
||||
assert!(!features.apps_enabled_for_auth(/*auth*/ None));
|
||||
assert!(!features.apps_enabled_for_auth(/*has_chatgpt_auth*/ false));
|
||||
|
||||
features.enable(Feature::Apps);
|
||||
assert!(!features.apps_enabled_for_auth(/*auth*/ None));
|
||||
|
||||
let api_key_auth = codex_login::CodexAuth::from_api_key("test-api-key");
|
||||
assert!(!features.apps_enabled_for_auth(Some(&api_key_auth)));
|
||||
|
||||
let chatgpt_auth = codex_login::CodexAuth::create_dummy_chatgpt_auth_for_testing();
|
||||
assert!(features.apps_enabled_for_auth(Some(&chatgpt_auth)));
|
||||
assert!(!features.apps_enabled_for_auth(/*has_chatgpt_auth*/ false));
|
||||
assert!(features.apps_enabled_for_auth(/*has_chatgpt_auth*/ true));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in new issue
Block a user