Skip to content

Commit dc5988a

Browse files
committed
refactor: remove asset scanning tests for bulk publish with api_version: 3.2
1 parent e776cdb commit dc5988a

2 files changed

Lines changed: 0 additions & 45 deletions

File tree

test/sanity-check/api/bulkOperation-test.js

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -544,30 +544,6 @@ describe('BulkOperation api test', () => {
544544
.catch(done)
545545
})
546546

547-
// Asset Scanning: bulk publish must send api_version: 3.2 so the CDA runs scan validation.
548-
// Without this header, quarantined assets incorrectly appear as published in the UI.
549-
describe('Asset Scanning — Bulk Publish with api_version: 3.2', function () {
550-
it('should bulk publish assets with api_version: 3.2 header for CDA scan validation', async function () {
551-
this.timeout(30000)
552-
const assets = assetsWithValidUids()
553-
if (assets.length === 0) {
554-
return this.skip()
555-
}
556-
const publishDetails = {
557-
assets,
558-
locales: ['en-us'],
559-
environments: [envName]
560-
}
561-
562-
const response = await doBulkOperation().publish({ details: publishDetails, api_version: '3.2' })
563-
564-
// Bulk publish always returns a job_id regardless of individual asset scan status.
565-
// Actual scan failures surface asynchronously in the Publish Queue UI.
566-
expect(response.notice).to.be.a('string')
567-
expect(response.job_id).to.be.a('string')
568-
})
569-
})
570-
571547
// DX-4430 regression: SDK was masking real API errors (401+error_code 161/294) with
572548
// generic "Session timed out, please login to proceed" / "Unable to refresh token".
573549
// Fix: NON_AUTH_401_ERROR_CODES={161,294} bypass token refresh and surface original error.

test/unit/bulkOperation-test.js

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -107,27 +107,6 @@ describe('Contentstack BulkOperation test', () => {
107107
expect(response.job_id).to.not.equal(undefined)
108108
})
109109

110-
it('should send api_version 3.2 header when bulk publishing assets for scan validation', async () => {
111-
const publishDetails = {
112-
assets: [{ uid: 'asset_uid', version: 1, locale: 'en-us' }],
113-
locales: ['en-us'],
114-
environments: ['development']
115-
}
116-
117-
const mock = new MockAdapter(Axios)
118-
mock.onPost('/bulk/publish').reply((config) => {
119-
expect(config.headers.api_version).to.equal('3.2')
120-
return [200, {
121-
notice: 'Your bulk publish request is in progress. Please check publish queue for more details.',
122-
job_id: 'job_id'
123-
}]
124-
})
125-
126-
const response = await makeBulkOperation().publish({ details: publishDetails, api_version: '3.2' })
127-
expect(response.notice).to.include('bulk publish')
128-
expect(response.job_id).to.not.equal(undefined)
129-
})
130-
131110
it('should unpublish items in bulk', async () => {
132111
const unpublishDetails = {
133112
entries: [

0 commit comments

Comments
 (0)