mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 16:20:43 +00:00
test(onboarding): assert channel status surfaces
This commit is contained in:
@@ -24,6 +24,7 @@ Docs: https://docs.openclaw.ai
|
||||
- Plugins/onboarding: trust optional official plugin and web-search installs selected from the official catalog so npm security scanning treats them like other source-linked official install paths. Thanks @vincentkoc.
|
||||
- Tests/plugins: expose the Discord npm onboarding Docker lane as a package script and assert planned Docker lanes point at real scripts, so external-channel onboarding coverage can actually run. Thanks @vincentkoc.
|
||||
- Plugins/ClawHub: explain unreleased ClawHub plugin artifacts as a rollout-state fallback to `npm:` installs instead of leaking raw archive metadata fields. Thanks @vincentkoc.
|
||||
- Tests/onboarding: assert packaged channel onboarding leaves `openclaw channels status --json` and plain `openclaw status` showing the configured channel, covering the empty Channels table regression path. Thanks @vincentkoc.
|
||||
- Microsoft Teams: persist sent-message markers across Gateway restarts so follow-up replies to recent bot messages keep resolving the original conversation instead of dropping out after restart, with marker TTLs preserved on best-effort recovery. (#75585) Thanks @amknight.
|
||||
- Matrix: persist pending approval reaction targets across Gateway restarts so room approvers can still approve or deny outstanding prompts after OpenClaw comes back online. (#75586) Thanks @amknight.
|
||||
- Channels/onboarding: map third-party official WeCom and Yuanbao catalog entries to their published plugin ids so npm installs pass expected-plugin validation. Thanks @vincentkoc.
|
||||
|
||||
@@ -95,6 +95,28 @@ function assertChannelConfig() {
|
||||
}
|
||||
}
|
||||
|
||||
function assertStatusSurfaces() {
|
||||
const channel = process.argv[3];
|
||||
const channelsStatusPath = process.argv[4];
|
||||
const statusTextPath = process.argv[5];
|
||||
const channelsStatus = readJson(channelsStatusPath);
|
||||
const configuredChannels = Array.isArray(channelsStatus.configuredChannels)
|
||||
? channelsStatus.configuredChannels
|
||||
: [];
|
||||
if (!configuredChannels.includes(channel)) {
|
||||
throw new Error(
|
||||
`channels status did not list configured channel ${channel}. Payload: ${JSON.stringify(channelsStatus)}`,
|
||||
);
|
||||
}
|
||||
const statusText = fs.readFileSync(statusTextPath, "utf8");
|
||||
if (!/channels/i.test(statusText)) {
|
||||
throw new Error(`plain status output did not render a Channels section. Output: ${statusText}`);
|
||||
}
|
||||
if (!statusText.toLowerCase().includes(channel.toLowerCase())) {
|
||||
throw new Error(`plain status output did not mention ${channel}. Output: ${statusText}`);
|
||||
}
|
||||
}
|
||||
|
||||
function assertAgentTurn() {
|
||||
const marker = process.argv[3];
|
||||
const logPath = process.argv[4];
|
||||
@@ -112,6 +134,7 @@ const commands = {
|
||||
"assert-onboard-state": assertOnboardState,
|
||||
"configure-mock-model": configureMockModel,
|
||||
"assert-channel-config": assertChannelConfig,
|
||||
"assert-status-surfaces": assertStatusSurfaces,
|
||||
"assert-agent-turn": assertAgentTurn,
|
||||
};
|
||||
|
||||
|
||||
@@ -92,6 +92,10 @@ dump_debug_logs() {
|
||||
/tmp/openclaw-install.log \
|
||||
/tmp/openclaw-onboard.json \
|
||||
/tmp/openclaw-channel-add.log \
|
||||
/tmp/openclaw-channels-status.json \
|
||||
/tmp/openclaw-channels-status.err \
|
||||
/tmp/openclaw-status.txt \
|
||||
/tmp/openclaw-status.err \
|
||||
/tmp/openclaw-doctor.log \
|
||||
/tmp/openclaw-agent.combined \
|
||||
/tmp/openclaw-agent.err \
|
||||
@@ -137,6 +141,11 @@ echo "Configuring $CHANNEL..."
|
||||
openclaw channels add --channel "$CHANNEL" --token "$CHANNEL_TOKEN" >/tmp/openclaw-channel-add.log 2>&1
|
||||
node scripts/e2e/lib/npm-onboard-channel-agent/assertions.mjs assert-channel-config "$CHANNEL" "$CHANNEL_TOKEN"
|
||||
|
||||
echo "Checking status surfaces for $CHANNEL..."
|
||||
openclaw channels status --json >/tmp/openclaw-channels-status.json 2>/tmp/openclaw-channels-status.err
|
||||
openclaw status >/tmp/openclaw-status.txt 2>/tmp/openclaw-status.err
|
||||
node scripts/e2e/lib/npm-onboard-channel-agent/assertions.mjs assert-status-surfaces "$CHANNEL" /tmp/openclaw-channels-status.json /tmp/openclaw-status.txt
|
||||
|
||||
echo "Running doctor after channel activation..."
|
||||
openclaw doctor --repair --non-interactive >/tmp/openclaw-doctor.log 2>&1
|
||||
if [ "$CHANNEL_PACKAGE_MODE" = "external" ]; then
|
||||
|
||||
Reference in New Issue
Block a user