BREV-1585: add workbench integration test and actions workflow config#249
Conversation
theFong
left a comment
There was a problem hiding this comment.
Useful even if just running locally with auth. Will need to figure out a way to auth to backend from CI
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #249 +/- ##
==========================================
- Coverage 12.88% 12.54% -0.34%
==========================================
Files 105 106 +1
Lines 12756 13098 +342
==========================================
Hits 1643 1643
- Misses 10892 11234 +342
Partials 221 221
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
8a70a15 to
48a5d4a
Compare
|
@tylerfong or @theFong if either of you get a chance to re-review |
| } | ||
|
|
||
| // Test_OrgListCommandOutputFormat verifies that 'brev org ls' outputs parseable table format | ||
| func Test_OrgListCommandOutputFormat(t *testing.T) { |
There was a problem hiding this comment.
This test will effectively always be skipped since CI will not have a logged in user context. See here in the test output: https://github.com/brevdev/brev-cli/actions/runs/16530181989/job/46753395303?pr=249
I'm not sure if we handle this elsewhere in the CLI testing, but an approach could be to pass in a mock for the API calls such that we don't require auth since we are just validating the output. This isn't a trivial thing to figure out so I won't make this blocking haha
There was a problem hiding this comment.
Agreed, mocking the auth response would be my preferred approach. I think that would be better as a separate PR given the size of the changeset.
There was a problem hiding this comment.
I could comment out the test, but this avoids the missed todo/refactor step. Happy to slice this up however makes sense
| } | ||
|
|
||
| // Test_InstanceListCommandOutputFormat verifies that 'brev ls' outputs parseable table format | ||
| func Test_InstanceListCommandOutputFormat(t *testing.T) { |
There was a problem hiding this comment.
Similarly, this test will always be skipped
|
Was actually brev-1580 RIP |
…#249) BREV-1585: add workbench integration test and actions workflow config


https://linear.app/brevidia/issue/BREV-1580/add-test-to-brev-cli-for-workbench-integration
📋 Created Files:
1. CLI Output Compatibility Tests (
pkg/integration/cli_output_compatibility_test.go)brev --versionoutputs parseable X.Y.Z formatbrev org lstable format and current org marking with "*"brev lstable format with NAME, STATUS, ID, MACHINE columnsrefresh,org set,start,stop) exist/v1/instance/typesendpoint format and response structure2. GitHub Actions Workflow (
.github/workflows/cli-output-compatibility.yml)🛡️ Protection Coverage:
The tests protect against breaking changes in:
✅ Version output format - External tools parse
Current Version: X.Y.Z✅ Org listing table - Column headers and current org marking
✅ Instance listing table - Column positions and headers
✅ Command availability - Core commands remain accessible
✅ API response format - Instance types endpoint structure
✅ Version comparison logic - Semantic version parsing compatibility
🔧 CI Integration:
🎯 Next Steps:
This solution ensures that any changes to CLI output formats that external integrations depend on will be caught before they break downstream tools, while providing clear guidance to developers on how to handle intentional format changes.