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
sreya merged 1 commit into
masterfrom
test
Apr 30, 2019
Merged

sreya merged 1 commit into
masterfrom
test

Conversation

@sreya

@sreya sreya commented Apr 24, 2019

Copy link
Copy Markdown
Collaborator

No description provided.

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

@nhooyr nhooyr left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread main.go Outdated
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

Comment thread main.go Outdated
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
Copy Markdown
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?

Comment thread test.sh Resolved
@sreya
sreya requested review from ammario and nhooyr April 26, 2019 22:47
Comment thread sshcode_test.go Resolved

@nhooyr nhooyr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks solid otherwise 🚀

Comment thread main.go Resolved
Comment thread main.go Resolved
Comment thread sshcode_test.go Resolved
@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