Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extension testing with default settings #97995

Closed
hyangah opened this issue May 16, 2020 · 4 comments
Closed

extension testing with default settings #97995

hyangah opened this issue May 16, 2020 · 4 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality

Comments

@hyangah
Copy link

hyangah commented May 16, 2020

I want to launch extension tests with the default, empty settings, instead of using my own user settings.

We have the following launch.json setting, not much different from what's in the testing-extension doc except a couple of additional flags.

		{
			"name": "Launch Extension Tests",
			"type": "extensionHost",
			"request": "launch",
			"runtimeExecutable": "${execPath}",
			"args": [
				"--disable-extensions",
				"--extensionDevelopmentPath=${workspaceFolder}",
				"--extensionTestsPath=${workspaceFolder}/out/test/integration/index",
				"--user-data-dir", "/tmp/empty",
				"--timeout",
				"999999"
			],
			"stopOnEntry": false,
			"sourceMaps": true,
			"outFiles": [
				"${workspaceFolder}/out/test/**/*.js"
			],
			"preLaunchTask": "npm: watch"
		},

I hoped this --user-data-dir flag could help us starting with empty user settings.
I think it worked a couple of months ago but today I found it doesn't work as I remembered.
Maybe it's a recent regression, or it never worked and I was confused.

I checked the extension development host launched with this launch button, and verified it's still accessing my user profile and settings.

Interestingly, if I pass /dev/null to --user-data-dir (as used in chrome projects to create a clean testing environment), the extension development host is stuck in a blank window.

Back to my original question: Is there a way to launch extension tests in a clean environment?


  • VS Code version: Code - Insiders 1.46.0-insider (6849775, 2020-05-15T09:06:06.454Z)
  • OS version: Darwin x64 18.7.0

Does this issue occur when all extensions are disabled?: Yes

@weinand weinand added the debug Debug viewlet, configurations, breakpoints, adapter issues label May 18, 2020
hyangah added a commit to hyangah/vscode-go-old that referenced this issue Jun 16, 2020
installation tests require multiple fs operations, and 2s may be
too short to complete everything on time. Allow more time.

And disable the gopls update check in gopls testing. That shortens
the time to bring up the gopls server.

Also remove the hack to start the test with a clean user profile
(--user-data-dir). That doesn't seem to work but interferes with
picking up the workspace settings, which I do not understand why.

Updates golang/vscode-go#169
Updates golang/vscode-go#43
Updates microsoft/vscode#97995

Change-Id: I5dbb33514a25a2071bf5bdf4ad248087e7e9b322
gopherbot pushed a commit to golang/vscode-go that referenced this issue Jun 16, 2020
installation tests require multiple fs operations, and 2s may be
too short to complete everything on time. Allow more time.

And disable the gopls update check in gopls testing. That shortens
the time to bring up the gopls server.

Also remove the hack to start the test with a clean user profile
(--user-data-dir). That doesn't seem to work but interferes with
picking up the workspace settings, which I do not understand why.

Updates #169
Updates #43
Updates microsoft/vscode#97995

Change-Id: I0e8b7d8f1f47f2e68696c6bd078c1ad2a0fe6780
GitHub-Last-Rev: f414011
GitHub-Pull-Request: #231
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/238001
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
@weinand weinand added the feature-request Request for new features or functionality label Nov 5, 2020
@weinand
Copy link
Contributor

weinand commented Nov 9, 2020

/duplicate #44734

@hyangah
Copy link
Author

hyangah commented Nov 11, 2020

We found #7243 (comment) and supplying "--user-data-dir= "/tmp/empty" instead of "--user-data-dir", "/tmp/empty" (note: =) made it work as intended.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

3 participants
@weinand @hyangah and others