Skip to content

Commit 1631fdb

Browse files
fix(e2e): update --agent to --runtime in e2e tests (#725)
CLI commands were renamed from --agent to --runtime but e2e tests were not updated, causing all invoke, status, logs, traces, and evals e2e tests to fail with "unknown option '--agent'". - e2e-helper.ts: --agent → --runtime (invoke, logs, traces), --agent-runtime-id → --runtime-id (status) - evals-lifecycle.test.ts: --agent → --runtime (add online-eval, invoke, run eval, evals history) - byo-custom-jwt.test.ts: --agent → --runtime (invoke)
1 parent c60b668 commit 1631fdb

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

e2e-tests/byo-custom-jwt.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ describe.sequential('e2e: BYO agent with CUSTOM_JWT auth', () => {
239239

240240
// The CLI uses SigV4 by default — a CUSTOM_JWT runtime should reject it
241241
const result = await runLocalCLI(
242-
['invoke', '--prompt', 'Say hello', '--agent', agentName, '--json'],
242+
['invoke', '--prompt', 'Say hello', '--runtime', agentName, '--json'],
243243
projectPath
244244
);
245245

e2e-tests/e2e-helper.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export function createE2ESuite(cfg: E2EConfig) {
142142
await retry(
143143
async () => {
144144
const result = await runAgentCoreCLI(
145-
['invoke', '--prompt', 'Say hello', '--agent', agentName, '--json'],
145+
['invoke', '--prompt', 'Say hello', '--runtime', agentName, '--json'],
146146
projectPath
147147
);
148148

@@ -205,7 +205,7 @@ export function createE2ESuite(cfg: E2EConfig) {
205205
async () => {
206206
expect(runtimeId, 'Runtime ID should have been extracted from status').toBeTruthy();
207207

208-
const result = await run(['status', '--agent-runtime-id', runtimeId, '--json']);
208+
const result = await run(['status', '--runtime-id', runtimeId, '--json']);
209209

210210
expect(result.exitCode, `Runtime lookup failed: ${result.stderr}`).toBe(0);
211211

@@ -227,7 +227,7 @@ export function createE2ESuite(cfg: E2EConfig) {
227227
await retry(
228228
async () => {
229229
// --since 1h triggers search mode (avoids live tail)
230-
const result = await run(['logs', '--agent', agentName, '--since', '1h', '--json']);
230+
const result = await run(['logs', '--runtime', agentName, '--since', '1h', '--json']);
231231

232232
expect(result.exitCode, `Logs failed: ${result.stderr}`).toBe(0);
233233

@@ -254,7 +254,7 @@ export function createE2ESuite(cfg: E2EConfig) {
254254
'logs supports level filtering',
255255
async () => {
256256
// --level error should succeed even if no error-level logs exist
257-
const result = await run(['logs', '--agent', agentName, '--since', '1h', '--level', 'error', '--json']);
257+
const result = await run(['logs', '--runtime', agentName, '--since', '1h', '--level', 'error', '--json']);
258258

259259
expect(result.exitCode, `Logs --level failed: ${result.stderr}`).toBe(0);
260260
},
@@ -267,7 +267,7 @@ export function createE2ESuite(cfg: E2EConfig) {
267267
// traces list has no --json flag — verify exit code and non-empty output
268268
await retry(
269269
async () => {
270-
const result = await run(['traces', 'list', '--agent', agentName, '--since', '1h']);
270+
const result = await run(['traces', 'list', '--runtime', agentName, '--since', '1h']);
271271

272272
expect(result.exitCode, `Traces list failed (stderr: ${result.stderr})`).toBe(0);
273273
expect(result.stdout.length, 'Traces list should produce output').toBeGreaterThan(0);

e2e-tests/evals-lifecycle.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ describe.sequential('e2e: evaluations lifecycle', () => {
8484
'online-eval',
8585
'--name',
8686
onlineEvalName,
87-
'--agent',
87+
'--runtime',
8888
agentName,
8989
'--evaluator',
9090
evalName,
@@ -118,7 +118,7 @@ describe.sequential('e2e: evaluations lifecycle', () => {
118118
async () => {
119119
await retry(
120120
async () => {
121-
const result = await run(['invoke', '--prompt', 'Say hello', '--agent', agentName, '--json']);
121+
const result = await run(['invoke', '--prompt', 'Say hello', '--runtime', agentName, '--json']);
122122
expect(result.exitCode, `Invoke failed: ${result.stderr}`).toBe(0);
123123
const json = parseJsonOutput(result.stdout) as { success: boolean };
124124
expect(json.success).toBe(true);
@@ -138,7 +138,7 @@ describe.sequential('e2e: evaluations lifecycle', () => {
138138
const result = await run([
139139
'run',
140140
'eval',
141-
'--agent',
141+
'--runtime',
142142
agentName,
143143
'--evaluator',
144144
'Builtin.Faithfulness',
@@ -162,7 +162,7 @@ describe.sequential('e2e: evaluations lifecycle', () => {
162162
it.skipIf(!canRun)(
163163
'eval history shows the completed run',
164164
async () => {
165-
const result = await run(['evals', 'history', '--agent', agentName, '--json']);
165+
const result = await run(['evals', 'history', '--runtime', agentName, '--json']);
166166
expect(result.exitCode, `Evals history failed: ${result.stderr}`).toBe(0);
167167
const json = parseJsonOutput(result.stdout) as Record<string, unknown> & { runs: unknown[] };
168168
expect(json).toHaveProperty('success', true);

0 commit comments

Comments
 (0)