mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-18 18:04:17 +00:00
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
37 lines
699 B
Go
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")
|
|
}
|