-
Notifications
You must be signed in to change notification settings - Fork 214
Add a simple bash test #61
Conversation
There was a problem hiding this 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") |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about WSL?
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks solid otherwise 🚀
72f6d59
to
439b37f
Compare
Add a sanity test - Refactor and break out code from main() - Use a random remote port
No description provided.