test(openclaw): add tests for SQLite resilience and export config/provider for testability
Add 10 tests covering disableHistory config passthrough, initPromise retry after failure, graceful SQLite fallback, and PlatformProvider retry. Export mem0ConfigSchema and createProvider for test access. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
5ae627b51a
commit
630d44c634
+2
-2
@@ -549,7 +549,7 @@ function assertAllowedKeys(
|
||||
throw new Error(`${label} has unknown keys: ${unknown.join(", ")}`);
|
||||
}
|
||||
|
||||
const mem0ConfigSchema = {
|
||||
export const mem0ConfigSchema = {
|
||||
parse(value: unknown): Mem0Config {
|
||||
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
||||
throw new Error("openclaw-mem0 config required");
|
||||
@@ -615,7 +615,7 @@ const mem0ConfigSchema = {
|
||||
// Provider Factory
|
||||
// ============================================================================
|
||||
|
||||
function createProvider(
|
||||
export function createProvider(
|
||||
cfg: Mem0Config,
|
||||
api: OpenClawPluginApi,
|
||||
): Mem0Provider {
|
||||
|
||||
Reference in New Issue
Block a user