mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
test(e2e): follow quickstart hook defaults
This commit is contained in:
@@ -105,6 +105,14 @@ function assertOpenAiEnvRef() {
|
||||
assert(!readStateText().includes(rawKey), "raw OpenAI key was persisted");
|
||||
}
|
||||
|
||||
function assertSessionMemoryHookEnabled() {
|
||||
const cfg = readJson(configPath());
|
||||
assert(
|
||||
cfg.hooks?.internal?.entries?.["session-memory"]?.enabled === true,
|
||||
"session-memory hook was not enabled",
|
||||
);
|
||||
}
|
||||
|
||||
function assertAgentTurn() {
|
||||
const marker = process.argv[3];
|
||||
const outputPath = process.argv[4];
|
||||
@@ -199,6 +207,7 @@ function assertPluginUninstalled() {
|
||||
const commands = {
|
||||
"configure-mock-openai": configureMockOpenAi,
|
||||
"assert-openai-env-ref": assertOpenAiEnvRef,
|
||||
"assert-session-memory-hook-enabled": assertSessionMemoryHookEnabled,
|
||||
"assert-agent-turn": assertAgentTurn,
|
||||
"assert-file-contains": assertFileContains,
|
||||
"assert-package-version": assertPackageVersion,
|
||||
|
||||
@@ -107,9 +107,6 @@ wait_for_log "Continue?" 60
|
||||
send $'y\r' 0.4
|
||||
wait_for_log "to search" 60
|
||||
send $'ollama\r' 0.4
|
||||
wait_for_log "Enable hooks?" 60
|
||||
send $' \r' 0.4
|
||||
send $'\r' 0.4
|
||||
|
||||
wait "$wizard_pid"
|
||||
wizard_pid=""
|
||||
@@ -117,6 +114,8 @@ exec 3>&-
|
||||
rm -rf "$input_fifo_dir"
|
||||
input_fifo_dir=""
|
||||
|
||||
node scripts/e2e/lib/release-scenarios/assertions.mjs assert-session-memory-hook-enabled
|
||||
|
||||
openclaw onboard \
|
||||
--non-interactive \
|
||||
--accept-risk \
|
||||
|
||||
Reference in New Issue
Block a user