test: add parameterized policy plumbing smoke test - #334671
Closed
Ross Wollman (rwoll) wants to merge 1 commit into
Closed
test: add parameterized policy plumbing smoke test#334671Ross Wollman (rwoll) wants to merge 1 commit into
Ross Wollman (rwoll) wants to merge 1 commit into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: cea11743-4d3d-48b7-9b6d-8028b722593d
Comment on lines
-230
to
+231
| } else if (environmentMainService.policyFile) { | ||
| } | ||
| if (environmentMainService.args['enable-smoke-test-driver'] && environmentMainService.policyFile) { |
Member
Author
There was a problem hiding this comment.
This part of the change needs more scrutiny since it is product, not test code.
Member
Author
There was a problem hiding this comment.
I will back this part of the change out and adjust the tests accordingly.
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The smoke policy currently takes precedence over native policy, enabling a production policy bypass through user-supplied launch flags.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 1
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
src/vs/code/electron-main/main.ts — MultiplexPolicyService applies later services last, so appending this user-writable smoke policy… |
What changed in this PR
Adds end-to-end smoke coverage for VS Code policy plumbing across managed and unmanaged profiles.
Changes:
- Adds parameterized policy smoke tests.
- Creates isolated portable profiles with optional file policy.
- Enables file policy alongside platform policy during smoke-driver launches.
| File | Description |
|---|---|
test/smoke/src/main.ts |
Registers the policy smoke suite. |
test/smoke/src/areas/policy/policy.test.ts |
Tests editable and managed policy states. |
src/vs/code/electron-main/main.ts |
Adds smoke-test file policy multiplexing. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| } else if (environmentMainService.policyFile) { | ||
| } | ||
| if (environmentMainService.args['enable-smoke-test-driver'] && environmentMainService.policyFile) { | ||
| policyServices.push(disposables.add(new FilePolicyService(environmentMainService.policyFile, fileService, logService))); |
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.

First slice of #334560; broader policy migration coverage follows separately.
Adds a parameterized
Policy Plumbingsmoke test: the same user setting is editable andonwithout policy, butoff, disabled, and marked Managed by organization withExtensionsAutoUpdate="off".Uses a fresh portable profile per variant. Enables the existing file-policy source alongside native policy only for smoke-driver launches; no new CLI flags.
Before merging
Ensure a stable, non-flaky test by running both variants 10x on:
🤖 Posted via Copilot.