Repository navigation
[Experiment - do not merge] API test key fallback without Commit - #12849
Draft
Prangshuman Das (t-prda) wants to merge 15 commits into
Draft
Prangshuman Das (t-prda) wants to merge 15 commits into
Prangshuman Das (t-prda) wants to merge 15 commits into
Conversation
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
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 inMicrosoft Test Auth Provider.CreateWebServiceKey.Question: under a test runner with test isolation (where
StartSessionis 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 401Authentication_InvalidCredentialsfailures compared with #12819, theCommit()can be dropped from the stack.Related: AB#646383