Skip to content

[Experiment - do not merge] API test key fallback without Commit - #12849

Draft
Prangshuman Das (t-prda) wants to merge 15 commits into
mainfrom
features/646383-exp-h-no-fallback-commit
Draft

Prangshuman Das (t-prda) wants to merge 15 commits into
mainfrom
features/646383-exp-h-no-fallback-commit

Conversation

@t-prda

@t-prda Prangshuman Das (t-prda) commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Experiment, do not merge. Built on top of the API test stack (#12674 … #12819). The only change compared with #12819 is removing Commit() from the isolated-runner fallback in Microsoft Test Auth Provider.CreateWebServiceKey.

Question: under a test runner with test isolation (where StartSession is not allowed), does the API request's separate server session see a web service key that the test created without committing? If the IntegrationTests/Uncategorized lanes show no new 401 Authentication_InvalidCredentials failures compared with #12819, the Commit() can be dropped from the stack.

Related: AB#646383

Authenticate API test requests with the current user's web service key and remove the
container password and Key Vault credential plumbing (ApiTestCredential, password cleanup,
PipelineFinalize hooks). Containers disable NavHttpClient anti-SSRF so API tests can call
the local server. Clean-tenant execution logic is unchanged. Adds the shared
SetLicenseSafeWorkDate and AddFieldToIgnoreIfExists helpers to Library - Graph Mgt.

AB#646383
AB#653393

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Remove the Expense API Test Auth Helper (no Key Vault secret, no subscriber) and apply the
Expense app and test fixes. Keep only Expense disablements that NAV master also has.
Enable clean test codeunit execution; APIV1/APIV2 tests that this surfaces are temporarily
excluded (entries from #12325) and re-enabled by the following layers.

AB#646383
AB#653393

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Re-enable APIV1, APIV2, IRS 1099 and E-Document API tests that pass without area-specific
fixture fixes. Only tests fixed by the following area layers and the two Company Info.
tests that NAV master disables stay excluded.

AB#646383
AB#653393

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Create missing VAT posting setup for item, item charge, resource and G/L account lines in
API document fixtures and re-enable the affected line and item variant tests.

AB#646383
AB#653393

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Create a reason code when none exists so cancel actions succeed and re-enable the
affected invoice and credit memo tests.

AB#646383
AB#653393

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Set dates before vendor defaults apply, use the payment-terms discount library and accept
localized payment lines, then re-enable the payment discount test.

AB#646383
AB#653393

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Align quote dates with the work date before converting to an order and re-enable the
make-order tests.

AB#646383
AB#653393

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Give the vendor payments batch a number series when it has none and re-enable the
vendor payment and apply vendor entry tests.

AB#646383
AB#653393

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Skip localized header fields that only exist in some countries when comparing page and
API documents and re-enable the through-page-and-API tests.

AB#646383
AB#653393

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Select the purchase return shipment report for return shipment PDF documents, run the
PDF document codeunits without test isolation and re-enable their TestExpandPdfDocument tests.

AB#646383
AB#653393

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Find created lines by unique description, refresh polled configuration packages, fix
assertion order and journal template handling, and re-enable the affected APIV1 tests.

AB#646383
AB#653393

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Reset-BcTestTenant removed the tenant database with the container's
Remove-NavDatabase, which takes the database offline with ROLLBACK IMMEDIATE
and no query timeout. Intermittently a leftover session kept tenant2 in use
and the removal blocked for about 30 minutes (the server's SQL command
timeout), stretching a test job by up to two hours.

End the tenant's server sessions before dismounting, then drop the database
with one bounded query (120 seconds, retried) that kills the remaining user
sessions on it, switches to SINGLE_USER and drops it. Log the ended sessions
and the drop time so any remaining stall is diagnosable.

AB#646383

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Get-NAVServerSession also returns internal sessions with negative IDs, which
Remove-NAVServerSession rejects. The first one aborted the loop, so tenant
sessions were not ended on most refreshes in CI. Only end sessions with a
non-negative ID and end each one independently.

AB#646383

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Re-enable the 47 API tests that BCApps disables but NAV runs: Report Inbox API E2E,
Sustainability API Tests, WFWH Subscription E2E, API Routes E2E, Webhook Logs E2E,
VAT Group Sub. Status, IRS 1099 API, Quality Management Inspections API, and the
general journal web service test.

AB#646383

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Do not merge. Checks whether API requests authenticate when the web service key is
created without Commit() under a test runner with test isolation.

AB#646383

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
@github-actions github-actions Bot added Build: Automation Workflows and other setup in .github folder Build: scripts & configs Build scripts and configuration files AL: Apps (W1) Add-on apps for W1 Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction Team: Other GitHub request for other area than SCM, Finance or Integration labels Oct 14, 2026
@github-actions github-actions Bot added this to the Version 30.0 milestone Oct 14, 2026

This branch was successfully deployed

1 active deployment
triage — 5c934c70 Deployed Oct 14, 2026 by t-prda via Classify team ownership #7928
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1 Build: Automation Workflows and other setup in .github folder Build: scripts & configs Build scripts and configuration files Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction Team: Other GitHub request for other area than SCM, Finance or Integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant