diff options
| author | 2026-02-21 13:38:02 +0800 | |
|---|---|---|
| committer | 2026-02-21 14:28:15 +0800 | |
| commit | 94482cb2c97aa215f83940643c5d4c0933727dcb (patch) | |
| tree | bee22fa113542abd1b863ee251fdcf0f9bd409b5 /refstore/shorten_test.go | |
| parent | diff: Add package-level doc comment (diff) | |
| signature | No signature | |
*: Modernize and lint; add CI v0.1.17
Diffstat (limited to 'refstore/shorten_test.go')
| -rw-r--r-- | refstore/shorten_test.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/refstore/shorten_test.go b/refstore/shorten_test.go index 1975ab3f..53e7e003 100644 --- a/refstore/shorten_test.go +++ b/refstore/shorten_test.go @@ -10,6 +10,7 @@ func TestShortenName(t *testing.T) { t.Parallel() t.Run("simple", func(t *testing.T) { + t.Parallel() got := refstore.ShortenName("refs/heads/main", []string{"refs/heads/main"}) if got != "main" { t.Fatalf("ShortenName simple = %q, want %q", got, "main") @@ -17,6 +18,7 @@ func TestShortenName(t *testing.T) { }) t.Run("ambiguous with tags", func(t *testing.T) { + t.Parallel() got := refstore.ShortenName( "refs/heads/main", []string{ @@ -30,6 +32,7 @@ func TestShortenName(t *testing.T) { }) t.Run("strict remote head ambiguity", func(t *testing.T) { + t.Parallel() // In strict mode, refs/remotes/%s/HEAD blocks shortening to "%s". got := refstore.ShortenName( "refs/heads/main", @@ -44,6 +47,7 @@ func TestShortenName(t *testing.T) { }) t.Run("deep fallback still shortens", func(t *testing.T) { + t.Parallel() // refs/remotes/origin/main conflicts with refs/heads/origin/main for // "origin/main", so it should fall back to "remotes/origin/main". got := refstore.ShortenName( @@ -59,6 +63,7 @@ func TestShortenName(t *testing.T) { }) t.Run("refs-prefix fallback", func(t *testing.T) { + t.Parallel() name := "refs/notes/review/topic" got := refstore.ShortenName(name, []string{name}) if got != "notes/review/topic" { |
