Skip to content

Commit b27de74

Browse files
vscheuberclaude
andcommitted
test(e2e): add forgeops shared auth cassette, drop stale login recordings
Seed shared/auth/forgeops (authenticate, getSessionInfo for the five realm paths in use) and shared/auth/forgeops/interactive (IDM token exchange) from the newest existing forgeops recordings. Remove what they replace: 124 per-test oauth2 recordings (whole files) and 248 authenticate/getSessionInfo entries from 124 am recordings. serverinfo stays per test. Full replay suite passes. Depends on the frodo-lib change enabling forgeops in SHARED_AUTH_DEPLOYMENT_TYPES. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PqcSs7nnL9SCPfu5aY38ns
1 parent 34ddb09 commit b27de74

250 files changed

Lines changed: 940 additions & 76095 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎test/e2e/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Every test should carry its own explicit `FRODO_TEST_NAME` — a short, file-uni
3636

3737
## Shared login recording
3838

39-
As of this pass, the login/session-bootstrap sequence (`/am/oauth2/*`, `/am/json/*/authenticate`, and the `getSessionInfo` call right after it) is recorded under one fixture per deployment type (`shared/auth/<type>`, under `test/e2e/mocks/shared_*/auth_*/<type>_*/`) instead of per test. Only `cloud` (`shared/auth/cloud`) exists so far: every cloud test that logs in replays that same fixture instead of carrying its own copy of the login sequence. Everything else — the actual command behavior under test — is still recorded per test file as before. Classic and forgeops tests are untouched for now — they keep the original per-command recording name until their own cassettes are populated. They can't share one: forgeops is a platform deployment (AM, IDM, DS) that needs an oauth2 token for IDM, while classic is AM-only and never makes an oauth2 call.
39+
As of this pass, the login/session-bootstrap sequence (`/am/oauth2/*`, `/am/json/*/authenticate`, and the `getSessionInfo` call right after it) is recorded under one fixture per deployment type (`shared/auth/<type>`, under `test/e2e/mocks/shared_*/auth_*/<type>_*/`) instead of per test. `cloud` (`shared/auth/cloud`) and `forgeops` (`shared/auth/forgeops`, plus `.../interactive` for its IDM token exchange) exist so far: every test of those types that logs in replays that same fixture instead of carrying its own copy of the login sequence. Everything else — the actual command behavior under test, including the `serverinfo` call, which differs per deployment — is still recorded per test file as before. Classic tests are untouched for now — they keep the original per-command recording name until their own cassette is populated. Classic and forgeops can't share one: forgeops is a platform deployment (AM, IDM, DS) that needs an oauth2 token for IDM, while classic is AM-only and never makes an oauth2 call.
4040

4141
**How a test picks its cassette.** `getEnv()` in `test/e2e/utils/TestUtils.js` exports the connection's `type` (declared on each connection in `TestConfig.js`: `cloud`, `forgeops` or `classic`) as `FRODO_MOCK_DEPLOYMENT`, and `SetupPollyForFrodoLib.ts` uses it to choose `shared/auth/<type>`. Nothing else is reliable at the time Polly is configured: frodo-lib's own deployment type isn't known until login is already under way, and classic and forgeops login requests are identical up to that point. If `FRODO_MOCK_DEPLOYMENT` is unset, cloud hosts are still recognized by hostname. Any new connection added to `TestConfig.js` needs a `type`.
4242

‎test/e2e/mocks/app_527074092/export_4211608755/alphaBravoNoPrefix_704196702/am_1076162899/recording.har‎

Lines changed: 0 additions & 325 deletions
Original file line numberDiff line numberDiff line change
@@ -151,331 +151,6 @@
151151
"wait": 35
152152
}
153153
},
154-
{
155-
"_id": "9f5671275c36a1c0090d0df26ce0e93f",
156-
"_order": 0,
157-
"cache": {},
158-
"request": {
159-
"bodySize": 2,
160-
"cookies": [],
161-
"headers": [
162-
{
163-
"name": "accept",
164-
"value": "application/json, text/plain, */*"
165-
},
166-
{
167-
"name": "content-type",
168-
"value": "application/json"
169-
},
170-
{
171-
"name": "user-agent",
172-
"value": "@rockcarver/frodo-lib/4.0.0-6"
173-
},
174-
{
175-
"name": "x-forgerock-transactionid",
176-
"value": "frodo-16b3f5fa-48e1-4c12-afe1-d26264f73f7e"
177-
},
178-
{
179-
"name": "accept-api-version",
180-
"value": "resource=2.0, protocol=1.0"
181-
},
182-
{
183-
"name": "x-openam-username",
184-
"value": "amadmin"
185-
},
186-
{
187-
"name": "x-openam-password",
188-
"value": "41ghjnKpNFAFU/HXw82HbFbitYNOOJ0g"
189-
},
190-
{
191-
"name": "content-length",
192-
"value": "2"
193-
},
194-
{
195-
"name": "accept-encoding",
196-
"value": "gzip, compress, deflate, br"
197-
},
198-
{
199-
"name": "host",
200-
"value": "platform.dev.trivir.com"
201-
}
202-
],
203-
"headersSize": 496,
204-
"httpVersion": "HTTP/1.1",
205-
"method": "POST",
206-
"postData": {
207-
"mimeType": "application/json",
208-
"params": [],
209-
"text": "{}"
210-
},
211-
"queryString": [],
212-
"url": "https://platform.dev.trivir.com/am/json/realms/root/authenticate"
213-
},
214-
"response": {
215-
"bodySize": 167,
216-
"content": {
217-
"mimeType": "application/json",
218-
"size": 167,
219-
"text": "{\"tokenId\":\"<token id>\",\"successUrl\":\"/am/console\",\"realm\":\"/\"}"
220-
},
221-
"cookies": [
222-
{
223-
"httpOnly": true,
224-
"name": "route",
225-
"path": "/am",
226-
"secure": true,
227-
"value": "<cookie>"
228-
},
229-
{
230-
"httpOnly": true,
231-
"name": "iPlanetDirectoryPro",
232-
"path": "/",
233-
"sameSite": "none",
234-
"secure": true,
235-
"value": "<cookie>"
236-
},
237-
{
238-
"httpOnly": true,
239-
"name": "amlbcookie",
240-
"path": "/",
241-
"sameSite": "none",
242-
"secure": true,
243-
"value": "<cookie>"
244-
}
245-
],
246-
"headers": [
247-
{
248-
"name": "date",
249-
"value": "Fri, 13 Feb 2026 16:13:23 GMT"
250-
},
251-
{
252-
"name": "content-type",
253-
"value": "application/json"
254-
},
255-
{
256-
"name": "content-length",
257-
"value": "167"
258-
},
259-
{
260-
"name": "connection",
261-
"value": "keep-alive"
262-
},
263-
{
264-
"_fromType": "array",
265-
"name": "set-cookie",
266-
"value": "route=<cookie>; Path=/am; Secure; HttpOnly"
267-
},
268-
{
269-
"_fromType": "array",
270-
"name": "set-cookie",
271-
"value": "iPlanetDirectoryPro=<cookie>; Path=/; Secure; HttpOnly; SameSite=none"
272-
},
273-
{
274-
"_fromType": "array",
275-
"name": "set-cookie",
276-
"value": "amlbcookie=<cookie>; Path=/; Secure; HttpOnly; SameSite=none"
277-
},
278-
{
279-
"name": "x-frame-options",
280-
"value": "SAMEORIGIN"
281-
},
282-
{
283-
"name": "x-content-type-options",
284-
"value": "nosniff"
285-
},
286-
{
287-
"name": "cache-control",
288-
"value": "private"
289-
},
290-
{
291-
"name": "content-api-version",
292-
"value": "resource=2.1"
293-
},
294-
{
295-
"name": "expires",
296-
"value": "0"
297-
},
298-
{
299-
"name": "pragma",
300-
"value": "no-cache"
301-
},
302-
{
303-
"name": "strict-transport-security",
304-
"value": "max-age=31536000; includeSubDomains"
305-
}
306-
],
307-
"headersSize": 693,
308-
"httpVersion": "HTTP/1.1",
309-
"redirectURL": "",
310-
"status": 200,
311-
"statusText": "OK"
312-
},
313-
"startedDateTime": "2026-02-13T16:13:23.789Z",
314-
"time": 29,
315-
"timings": {
316-
"blocked": -1,
317-
"connect": -1,
318-
"dns": -1,
319-
"receive": 0,
320-
"send": 0,
321-
"ssl": -1,
322-
"wait": 29
323-
}
324-
},
325-
{
326-
"_id": "7ecba04941a5ad5ef7ee219ac7918eb2",
327-
"_order": 0,
328-
"cache": {},
329-
"request": {
330-
"bodySize": 128,
331-
"cookies": [],
332-
"headers": [
333-
{
334-
"name": "accept",
335-
"value": "application/json, text/plain, */*"
336-
},
337-
{
338-
"name": "content-type",
339-
"value": "application/json"
340-
},
341-
{
342-
"name": "user-agent",
343-
"value": "@rockcarver/frodo-lib/4.0.0-6"
344-
},
345-
{
346-
"name": "x-forgerock-transactionid",
347-
"value": "frodo-16b3f5fa-48e1-4c12-afe1-d26264f73f7e"
348-
},
349-
{
350-
"name": "accept-api-version",
351-
"value": "resource=4.0"
352-
},
353-
{
354-
"name": "content-length",
355-
"value": "128"
356-
},
357-
{
358-
"name": "accept-encoding",
359-
"value": "gzip, compress, deflate, br"
360-
},
361-
{
362-
"name": "host",
363-
"value": "platform.dev.trivir.com"
364-
}
365-
],
366-
"headersSize": 449,
367-
"httpVersion": "HTTP/1.1",
368-
"method": "POST",
369-
"postData": {
370-
"mimeType": "application/json",
371-
"params": [],
372-
"text": "{\"tokenId\":\"<token id>\"}"
373-
},
374-
"queryString": [
375-
{
376-
"name": "_action",
377-
"value": "getSessionInfo"
378-
}
379-
],
380-
"url": "https://platform.dev.trivir.com/am/json/realms/root/realms/alpha/realms/bravo/sessions/?_action=getSessionInfo"
381-
},
382-
"response": {
383-
"bodySize": 290,
384-
"content": {
385-
"mimeType": "application/json;charset=UTF-8",
386-
"size": 290,
387-
"text": "{\"username\":\"amadmin\",\"universalId\":\"id=amadmin,ou=user,ou=am-config\",\"realm\":\"/\",\"latestAccessTime\":\"2026-02-13T16:13:23Z\",\"maxIdleExpirationTime\":\"2026-02-13T16:43:23Z\",\"maxSessionExpirationTime\":\"2026-02-13T18:13:22Z\",\"properties\":{\"AMCtxId\":\"7886a756-5a7e-4e95-acf5-015253b04f01-1238\"}}"
388-
},
389-
"cookies": [
390-
{
391-
"httpOnly": true,
392-
"name": "route",
393-
"path": "/am",
394-
"secure": true,
395-
"value": "<cookie>"
396-
}
397-
],
398-
"headers": [
399-
{
400-
"name": "date",
401-
"value": "Fri, 13 Feb 2026 16:13:23 GMT"
402-
},
403-
{
404-
"name": "content-type",
405-
"value": "application/json;charset=UTF-8"
406-
},
407-
{
408-
"name": "content-length",
409-
"value": "290"
410-
},
411-
{
412-
"name": "connection",
413-
"value": "keep-alive"
414-
},
415-
{
416-
"_fromType": "array",
417-
"name": "set-cookie",
418-
"value": "route=<cookie>; Path=/am; Secure; HttpOnly"
419-
},
420-
{
421-
"name": "x-frame-options",
422-
"value": "SAMEORIGIN"
423-
},
424-
{
425-
"name": "x-content-type-options",
426-
"value": "nosniff"
427-
},
428-
{
429-
"name": "cache-control",
430-
"value": "private"
431-
},
432-
{
433-
"name": "content-api-version",
434-
"value": "resource=4.0"
435-
},
436-
{
437-
"name": "content-security-policy",
438-
"value": "default-src 'none';frame-ancestors 'none';sandbox"
439-
},
440-
{
441-
"name": "cross-origin-opener-policy",
442-
"value": "same-origin"
443-
},
444-
{
445-
"name": "cross-origin-resource-policy",
446-
"value": "same-origin"
447-
},
448-
{
449-
"name": "expires",
450-
"value": "0"
451-
},
452-
{
453-
"name": "pragma",
454-
"value": "no-cache"
455-
},
456-
{
457-
"name": "strict-transport-security",
458-
"value": "max-age=31536000; includeSubDomains"
459-
}
460-
],
461-
"headersSize": 610,
462-
"httpVersion": "HTTP/1.1",
463-
"redirectURL": "",
464-
"status": 200,
465-
"statusText": "OK"
466-
},
467-
"startedDateTime": "2026-02-13T16:13:23.826Z",
468-
"time": 8,
469-
"timings": {
470-
"blocked": -1,
471-
"connect": -1,
472-
"dns": -1,
473-
"receive": 0,
474-
"send": 0,
475-
"ssl": -1,
476-
"wait": 8
477-
}
478-
},
479154
{
480155
"_id": "6125d0328ad0dcaee55f73fd8b22ca14",
481156
"_order": 0,

0 commit comments

Comments
 (0)