Files
skillshare/tests/integration/version_test.go
T
Willie 98db20a9a0 test: add !online build tag to offline integration tests
Prevent test-docker and test-docker-online from running the same 36
offline integration tests. Each offline test file now has
`//go:build !online` so the two sets are mutually exclusive:
- default (no tag): 36 offline tests only
- -tags online: online tests only
2026-02-11 03:40:54 +08:00

37 lines
699 B
Go

//go:build !online
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 v")
}
func TestVersion_LongFlag(t *testing.T) {
sb := testutil.NewSandbox(t)
defer sb.Cleanup()
result := sb.RunCLI("--version")
result.AssertSuccess(t)
result.AssertOutputContains(t, "skillshare v")
}