Skip to content

sg: Add first integration tests for `sg start`

Administrator requested to merge sg-hacking-hour/18-feb-22 into main

Created by: mrnugget

This ports the ttyBuf I once added to src-cli to lib/tty.Buffer and uses it to write some high-level tests for sg start.

The tests are pretty easy to write and to provide some confidence that code works as intended.

We can't use our real configuration if we don't have all the tools installed, but this test harness should be enough to test some sg-specific logic.

For example: we should probably write similar tests in the run package and make sure that running multiple commands also works and that restarting them works, etc.

Test plan

  • Ran go test in both of the new packages to test all the tests I added are green

Merge request reports

Loading