mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-18 09:16:22 +00:00
Self-setup providers in tests instead of relying on hardcoded openai/perplexity defaults. Multi-provider tests now use distinct URLs per provider; functional tests check for http/https URL presence rather than specific provider names. Drop ai_models_find tests (function removed upstream in feat/ai). Replace with reset-hook + persistence coverage: providers_reset_ac restart cycle, provider add/remove round-trip across init, model cache round-trip across init. Keep three autocomplete prefix-change tests red in-suite (documented as latent API-hygiene gap, unreachable from UI today). NULL-search test body retained but registration commented out — currently SIGSEGVs the cmocka runner. Add stub_xmpp connection_create_stanza_id to satisfy new cmd_funcs.c call site.
28 lines
1.0 KiB
C
28 lines
1.0 KiB
C
#ifndef __H_FUNC_TEST_AI
|
|
#define __H_FUNC_TEST_AI
|
|
|
|
/*
|
|
* AI tests don't exercise the XMPP path, but the test fixture's
|
|
* stbbr_stop() hangs indefinitely when no client ever connected to
|
|
* stabber. ai_init_test wraps init_prof_test with a prof_connect()
|
|
* so stabber sees a graceful disconnect at teardown.
|
|
*/
|
|
int ai_init_test(void** state);
|
|
|
|
void ai_no_args_shows_help(void** state);
|
|
void ai_providers_lists_defaults(void** state);
|
|
void ai_providers_list_shows_key_status(void** state);
|
|
void ai_set_provider_adds_custom(void** state);
|
|
void ai_set_token_marks_key_set(void** state);
|
|
void ai_start_unknown_provider_errors(void** state);
|
|
void ai_start_without_key_errors(void** state);
|
|
void ai_start_with_key_opens_window(void** state);
|
|
void ai_clear_without_window_errors(void** state);
|
|
void ai_remove_provider_works(void** state);
|
|
void ai_remove_provider_unknown_errors(void** state);
|
|
void ai_set_default_model_updates_provider(void** state);
|
|
void ai_switch_without_window_errors(void** state);
|
|
void ai_bad_subcommand_shows_usage(void** state);
|
|
|
|
#endif
|