Skip to content

DX | 30-03-2026 | Release#147

Open
harshitha-cstk wants to merge 46 commits intomainfrom
staging
Open

DX | 30-03-2026 | Release#147
harshitha-cstk wants to merge 46 commits intomainfrom
staging

Conversation

@harshitha-cstk
Copy link

No description provided.

harshithad0703 and others added 30 commits February 2, 2026 17:33
…BulkUnpublishService.cs.

Description
In BulkUnpublishService.cs, two comment-only lines were added to document an alternative way of sending the bulk unpublish options:
skip_workflow_stage_check – A commented call AddQueryResource("skip_workflow_stage_check", "true") was added next to the existing Headers["skip_workflow_stage_check"] = "true" assignment.
approvals – A commented call AddQueryResource("approvals", "true") was added next to the existing Headers["approvals"] = "true" assignment.
…add integration tests

- Bulk publish/unpublish: send skip_workflow_stage_check and approvals as query
  params via AddQueryResource instead of headers (BulkPublishService; BulkUnpublishService
  already used query params).
- Unit tests: in BulkPublishServiceTest, BulkUnpublishServiceTest, and
  BulkOperationServicesTest, assert on QueryResources instead of Headers for
  these two flags.
- Integration tests: add EnsureBulkTestContentTypeAndEntriesAsync() so
  bulk_test_content_type and at least one entry exist; add Test003a (bulk
  publish with skipWorkflowStage and approvals) and Test004a (bulk unpublish
  with same flags).
…ndling

Integration tests (Contentstack015_BulkOperationTest):

- API version 3.2:
  - Test003b: bulk publish with skipWorkflowStage, approvals, and apiVersion "3.2" (api_version header).
  - Test004b: bulk unpublish with skipWorkflowStage, approvals, and apiVersion "3.2" (api_version header).

- Error handling and assertions:

  - Add FailWithError(operation, ex) to report HTTP status, ErrorCode, and API message on ContentstackErrorException.

  - In Test003a, Test004a, Test003b, Test004b: assert response.StatusCode == HttpStatusCode.OK and use FailWithError in catch.

  - Add Test004c: negative test for bulk unpublish with invalid data (empty entries, non-existent env); expect ContentstackErrorException and assert non-success status and presence of error message.

- Usings: System.Net (HttpStatusCode), Contentstack.Management.Core.Exceptions (ContentstackErrorException).
…3a/004a/003b/004b), and 422/141 handling with console output.

Ensure environment (find/create bulk_test_env) and workflow “oggy” (find/create with branches/stages) in ClassInitialize; add Test000c for environment; update Test000a/000b with find-or-create and Branches; Test002 creates five entries and assigns workflow stages; Test003a/004a/003b/004b use bulkTestEnvironmentUid, PublishWithReference, and skipWorkflowStage/approvals (003b/004b with api_version 3.2); treat 422 ErrorCode 141 as expected and log full message to console; fix UnPublish → Unpublish.
…ulk_UnPublish_With_SkipWorkflowStage_And_Approvals

Added Proper Assertion and Status Code Mapping
…d cleanup

Improve the test lifecycle, initialization, and teardown of Contentstack015_BulkOperationTest.

Test method signature changes:
- Convert Test000a_Should_Create_Workflow_With_Two_Stages from async Task to void
  (no awaits were present; async keyword was unnecessary).
- Convert Test000b_Should_Create_Publishing_Rule_For_Workflow_Stage2 from async Task
  to void; replace await EnsureBulkTestEnvironmentAsync with the new sync helper.

New synchronous helpers:
- Add GetAvailableEnvironments(Stack) — sync version of GetAvailableEnvironmentsAsync,
  used by the new EnsureBulkTestEnvironment helper.
- Add EnsureBulkTestEnvironment(Stack) — sync version of EnsureBulkTestEnvironmentAsync,
  finds or creates bulk_test_env without blocking on a Task.

TestInitialize improvements:
- Uncomment and add CreateTestEnvironment() and CreateTestRelease() calls so a new
  stack gets test environment and release set up before each test.
- Add workflow initialization in TestInitialize: if _bulkTestWorkflowUid is not set
  (e.g. ClassInitialize failed or new stack), call
  EnsureBulkTestWorkflowAndPublishingRuleAsync to ensure workflow and publish rule
  are available.
- Add full explicit try/catch blocks for each setup step with Console.WriteLine
  logging and meaningful comments; workflow catch records the failure reason in
  _bulkTestWorkflowSetupError so workflow-based tests surface it via AssertWorkflowCreated().

New cleanup test:
- Add Test009_Should_Cleanup_Test_Resources (void, DoNotParallelize) that deletes
  all resources created during the test run in the correct order:
  1. All entries in _createdEntries
  2. Content type (bulk_test_content_type)
  3. Workflow and publishing rule (via CleanupBulkTestWorkflowAndPublishingRule)
  4. Test release
  5. Test environment
  Each step has its own try/catch with Console.WriteLine so one failed delete
  does not stop the remaining cleanup.
feat(DX-3233): Bulk publish/unpublish query params, api_version tests, and robust error handling
- Add Taxonomy and Term support to match the JavaScript CMA SDK.

Models:
- TaxonomyModel, TermModel (with TermAncestorDescendant, TermMoveModel), TaxonomyImportModel (IUploadInterface for multipart import).

Taxonomy:
- CRUD, Query(), Export(), Locales(), Localize(), Import(), Terms(termUid).
- Stack.Taxonomy(uid) entry point.

Term:
- CRUD, Query(), Ancestors(), Descendants(), Move(), Locales(), Localize(), Search(typeahead).
- Accessed via Stack.Taxonomy(taxonomyUid).Terms() / .Terms(termUid).

Services:
- Reuse CreateUpdateService, FetchDeleteService, QueryService; extend UploadService with optional query params for Import.

Tests:
- Unit: TaxonomyTest, TermTest (20 tests). Integration: Contentstack017_TaxonomyTest (create, fetch, query, update, delete). Use static taxonomy UID in integration test so all steps use the same created taxonomy.
feat: Add full Taxonomy and Terms API to .NET CMA SDK
### Summary
Adds an automated HTML report generator for the .NET CMA SDK integration tests.
### Changes
- Test helpers for capturing HTTP traffic, assertions, and test context
- Python script to parse TRX, Cobertura coverage, and structured output into an HTML report
- Shell script to orchestrate test execution and report generation
- Updated integration test files to use structured logging
### Report Includes
- Test summary (passed, failed, skipped, duration)
- Global and file-wise code coverage
- Per-test drill-down with assertions, HTTP requests/responses, and cURL commands
…eve auth token exclusively via Login API

### Summary
- Removed hardcoded `Authtoken` from `appSettings.json` to eliminate the security vulnerability of storing tokens in config files.
- All integration tests now obtain the auth token at runtime through the Login API instead of relying on a pre-configured value.
- Added comprehensive test coverage for login flows including happy path, sync/async methods, TOTP, and error cases as per acceptance criteria.

### Test Plan
- [ ] Login sync/async — happy path
- [ ] Login error cases — wrong credentials, null credentials, already logged in
- [ ] TOTP flow — valid/invalid MFA secret, explicit token override
- [ ] Logout sync/async after login
- [ ] All existing integration tests pass with runtime auth
…tDataHelper

Rename parameter 'key' to 'configKey' in GetRequiredConfig and GetOptionalConfig
so the scanner no longer treats it as a secret key. Values still come from config.
…tests.

- Deserialize schema fields by `extension_uid` when API returns underlying `data_type` (e.g. text).
- Add/update field models (taxonomy, JSON field, nullable limits, JRTE metadata, etc.) and register `FieldJsonConverter`.
- Add disposable content-type fixtures, `012b` coverage (sync/async, errors, complex/medium, taxonomy, extension upload + cleanup), and copy `customUpload.html` for tests.
- Rename content-type tests to `TestNNN_Should_*`; distinguish single-page vs multi-page create tests.
… so the scan writes snyk.json for contentstack/sca-policy, and the unused json
…nyk.json so the scan writes snyk.json for contentstack/sca-policy, and the unused json"

This reverts commit 508fafa.
OMpawar-21 and others added 16 commits March 23, 2026 11:57
feat(DX-5433): Retrieve auth token exclusively via Login API
feat(5434): extend content type schema coverage and validation in integration tests
Add Test031–Test036 in Contentstack013_AssetTest covering
ParameterCollection with locale=en-us on Fetch, FetchAsync, and
Query.Find, plus negative cases (invalid locale, invalid UID+locale,
query with invalid locale). Import Contentstack.Management.Core.Queryable.
feat(4454): add asset API tests for locale query params
@harshitha-cstk harshitha-cstk requested a review from a team as a code owner March 27, 2026 07:56
@github-actions
Copy link

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 0 25 ✅ Passed
🟡 Medium Severity 0 0 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

✅ BUILD PASSED - All security checks passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants