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

[Test] Proposed asExternalUri function #81677

Closed
3 tasks done
mjbvz opened this issue Sep 30, 2019 · 1 comment
Closed
3 tasks done

[Test] Proposed asExternalUri function #81677

mjbvz opened this issue Sep 30, 2019 · 1 comment

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Sep 30, 2019

Test for #81131

Complexity: 4

Overview

The new vscode.env.asExternalUri proposed api lets extensions resolve a uri in the local environment to one in the client environment. If the extension is running remote, resolving a localhost uri will automatically open a tunnel that the client can use to connect to the requested port on the remote.

The asExternalUri function should use the same basic logic as the openExternalUri api, however instead of opening the uri in the browser, it returns the resulting uri to the extension.

Testing

Write a simple extension that uses asExternalUri. I've provided an example here: https://github.com/mjbvz/vscode-test-asExternalUri

Using this test extension, check the following:

  • When the extension is run locally, asExternalUri returns the input

  • When the extension is run remotely, asExternalUri should open a tunnel for http/https localhost uris (both localhost and 127.0.0.1)

    • Resolving the same uri multiple time should return the same result.

    • The tunnels should get cleaned up when the client window is closed

    • Multiple instances of VS Code should be able to resolve the same localhost uri (each instance should get its own resolved result however)

  • Tunnels should never be opened for non-localhost uris

  • Review the jsdoc for asExternalUri. Can you understand how the api works from these docs?

@mjbvz mjbvz added this to the September 2019 milestone Sep 30, 2019
@mjbvz
Copy link
Contributor Author

mjbvz commented Sep 30, 2019

@Chuxel Can you please assign yourself to test one of the platforms for this issue

@alexr00 alexr00 removed their assignment Oct 1, 2019
@Chuxel Chuxel removed their assignment Oct 2, 2019
@Tyriar Tyriar removed their assignment Oct 2, 2019
@Tyriar Tyriar closed this as completed Oct 2, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants