Skip to content

Commit b6d1aca

Browse files
cboldisclaude
andcommitted
fix(cdn-log-delivery): remove client-side externalId tests after server-side derivation
externalId is now derived server-side from the site's IMS org id (resolveConnectorExternalId), so the client no longer supplies it. Remove the two tests that expected a 400 when externalId was absent from the request body, and align the imsOrgId assertion with TEST_IMS_ORG_ID. Introduced by: N/A Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent dd54a5b commit b6d1aca

1 file changed

Lines changed: 1 addition & 21 deletions

File tree

test/controllers/llmo/llmo-cloudfront.test.js

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2296,7 +2296,7 @@ describe('LlmoCloudFrontController', () => {
22962296
expect(callArgs.provider).to.equal('cloudfront');
22972297
expect(callArgs.resourceId).to.equal('E2EXAMPLE123');
22982298
expect(callArgs.accountId).to.equal('120569600543');
2299-
expect(callArgs.imsOrgId).to.equal('ABC123@AdobeOrg');
2299+
expect(callArgs.imsOrgId).to.equal(TEST_IMS_ORG_ID);
23002300
expect(callArgs.deliveryDestinationArn).to.equal(
23012301
'arn:aws:logs:us-east-1:111122223333:delivery-destination:cdn-logs-org',
23022302
);
@@ -2327,16 +2327,6 @@ describe('LlmoCloudFrontController', () => {
23272327
expect((await result.json()).message).to.include('12-digit');
23282328
});
23292329

2330-
it('returns 400 when the external id is missing', async () => {
2331-
const result = await controller.enableCdnLogDelivery({
2332-
...logDeliveryContext,
2333-
data: { accountId: '120569600543', distributionId: 'E2EXAMPLE123' },
2334-
});
2335-
2336-
expect(result.status).to.equal(400);
2337-
expect((await result.json()).message).to.include('externalId');
2338-
});
2339-
23402330
it('returns 400 when the distribution id is missing', async () => {
23412331
const result = await controller.enableCdnLogDelivery({
23422332
...logDeliveryContext,
@@ -2540,16 +2530,6 @@ describe('LlmoCloudFrontController', () => {
25402530
expect((await result.json()).message).to.include('12-digit');
25412531
});
25422532

2543-
it('returns 400 when the external id is missing', async () => {
2544-
const result = await controller.rescanCdnLogDelivery({
2545-
...rescanContext,
2546-
data: { accountId: '120569600543' },
2547-
});
2548-
2549-
expect(result.status).to.equal(400);
2550-
expect((await result.json()).message).to.include('externalId');
2551-
});
2552-
25532533
it('returns 500 when the destination account is not configured (server misconfig)', async () => {
25542534
const result = await controller.rescanCdnLogDelivery({ ...rescanContext, env: {} });
25552535

0 commit comments

Comments
 (0)