mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-20 20:34:19 +00:00
Add complete integration test coverage for all CLI commands with isolated sandbox environments that run on every change. Changes: - Add testutil package for sandbox test infrastructure - Add 77 integration tests covering all commands (init, sync, status, diff, backup, restore, pull, doctor, target, version, help) - Update CI workflow to run integration tests on Ubuntu and macOS - Add SKILLSHARE_CONFIG env var support for test isolation - Add mise.toml for task management - Move scripts to scripts/ directory
35 lines
675 B
Go
35 lines
675 B
Go
package integration
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"skillshare/internal/testutil"
|
|
)
|
|
|
|
func TestVersion_ShowsVersion(t *testing.T) {
|
|
sb := testutil.NewSandbox(t)
|
|
defer sb.Cleanup()
|
|
|
|
result := sb.RunCLI("version")
|
|
result.AssertSuccess(t)
|
|
result.AssertOutputContains(t, "skillshare")
|
|
}
|
|
|
|
func TestVersion_ShortFlag(t *testing.T) {
|
|
sb := testutil.NewSandbox(t)
|
|
defer sb.Cleanup()
|
|
|
|
result := sb.RunCLI("-v")
|
|
result.AssertSuccess(t)
|
|
result.AssertOutputContains(t, "skillshare")
|
|
}
|
|
|
|
func TestVersion_LongFlag(t *testing.T) {
|
|
sb := testutil.NewSandbox(t)
|
|
defer sb.Cleanup()
|
|
|
|
result := sb.RunCLI("--version")
|
|
result.AssertSuccess(t)
|
|
result.AssertOutputContains(t, "skillshare")
|
|
}
|