Skip to content
This repository was archived by the owner on Jan 17, 2021. It is now read-only.

Add a simple bash test #61

Merged
merged 1 commit into from
Apr 30, 2019
Merged

Add a simple bash test #61

merged 1 commit into from
Apr 30, 2019

Conversation

sreya
Copy link
Collaborator

@sreya sreya commented Apr 24, 2019

No description provided.

@sreya sreya requested review from ammario, nhooyr and kylecarbs April 24, 2019 18:54
Copy link
Contributor

@nhooyr nhooyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not have a more automated test for this?

You can start up a SSH server with crypto/ssh and that runs the given commands locally and then confirm code-server is up and running and then kill it.

main.go Outdated
@@ -64,6 +64,8 @@ func main() {
sshFlags = flag.String("ssh-flags", "", "custom SSH flags")
syncBack = flag.Bool("b", false, "sync extensions back on termination")
printVersion = flag.Bool("version", false, "print version information and exit")
port = flag.String("port", "", "Start VS Code on the provided port. If one is not provided a random one is selected")
noOpen = flag.Bool("no-open", false, "Start VS Code but don't open a Chrome app window")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets use $DISPLAY = "" for this

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is DISPLAY set on all macs?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, similar to how there is an X11 socket whose path is given by $DISPLAY, $DISPLAY on macOS contains the quartz socket.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about WSL?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WSL is almost certainly using some sort of X11 forwarding so it would have $DISPLAY.

main.go Outdated
@@ -64,6 +64,8 @@ func main() {
sshFlags = flag.String("ssh-flags", "", "custom SSH flags")
syncBack = flag.Bool("b", false, "sync extensions back on termination")
printVersion = flag.Bool("version", false, "print version information and exit")
port = flag.String("port", "", "Start VS Code on the provided port. If one is not provided a random one is selected")
noOpen = flag.Bool("no-open", false, "Start VS Code but don't open a Chrome app window")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is DISPLAY set on all macs?

@sreya sreya requested review from ammario and nhooyr April 26, 2019 22:47
Copy link
Contributor

@nhooyr nhooyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks solid otherwise 🚀

@sreya sreya merged commit 050d775 into master Apr 30, 2019
@sreya sreya deleted the test branch April 30, 2019 00:49
@sreya sreya mentioned this pull request Apr 30, 2019
sreya added a commit that referenced this pull request Apr 30, 2019
Add a sanity test

- Refactor and break out code from main()
- Use a random remote port
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants