detached 1dfc7dc

test(passkeys): end the options before a passkey id that may start with a dash

The id is random base64url, so one in 64 starts with "-" and cobra took it for
a flag: TestPasskeyEndToEnd failed on CI at random.
commit
1dfc7dce8e71006d413caa473e7d2b90dcfe0bed
author
brice · · 2026-10-13 11:41 UTC
parent
71757c4
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
1 file · +2 -2
M internal/app/web_passkey_test.go +2 -2
@@ -188,7 +188,7 @@ func TestPasskeyEndToEnd(t *testing.T) {
188188 assert.Equal(t, base64.RawURLEncoding.EncodeToString(p.cred.ID), listed[0].ID)
189189 assert.NotNil(t, listed[0].LastUsedAt, "the sign-in was recorded")
190190
191- rm := p.cli(t, adminToken, "web", "passkey", "remove", listed[0].ID).ok(t)
191+ rm := p.cli(t, adminToken, "web", "passkey", "remove", "--", listed[0].ID).ok(t)
192192 assert.Contains(t, rm.stderr, "every browser is signed out")
193193 for _, tok := range []string{token, ck.Value} {
194194 assert.Equal(t, http.StatusNotFound, p.b.get("/-/passkeys", as(tok)).status, "the epoch moved: both sessions are gone")
@@ -197,7 +197,7 @@ func TestPasskeyEndToEnd(t *testing.T) {
197197 res = p.login()
198198 assert.Equal(t, http.StatusUnauthorized, res.status, res.body)
199199 assert.Empty(t, res.hdr.Values("Set-Cookie"))
200- again := p.cli(t, adminToken, "web", "passkey", "remove", listed[0].ID)
200+ again := p.cli(t, adminToken, "web", "passkey", "remove", "--", listed[0].ID)
201201 require.Error(t, again.err)
202202 assert.Contains(t, again.err.Error(), "not found")
203203 }
@@ -188,7 +188,7 @@ func TestPasskeyEndToEnd(t *testing.T) {
188 assert.Equal(t, base64.RawURLEncoding.EncodeToString(p.cred.ID), listed[0].ID)188 assert.Equal(t, base64.RawURLEncoding.EncodeToString(p.cred.ID), listed[0].ID)
189 assert.NotNil(t, listed[0].LastUsedAt, "the sign-in was recorded")189 assert.NotNil(t, listed[0].LastUsedAt, "the sign-in was recorded")
190 190
191- rm := p.cli(t, adminToken, "web", "passkey", "remove", listed[0].ID).ok(t)191+ rm := p.cli(t, adminToken, "web", "passkey", "remove", "--", listed[0].ID).ok(t)
192 assert.Contains(t, rm.stderr, "every browser is signed out")192 assert.Contains(t, rm.stderr, "every browser is signed out")
193 for _, tok := range []string{token, ck.Value} {193 for _, tok := range []string{token, ck.Value} {
194 assert.Equal(t, http.StatusNotFound, p.b.get("/-/passkeys", as(tok)).status, "the epoch moved: both sessions are gone")194 assert.Equal(t, http.StatusNotFound, p.b.get("/-/passkeys", as(tok)).status, "the epoch moved: both sessions are gone")
@@ -197,7 +197,7 @@ func TestPasskeyEndToEnd(t *testing.T) {
197 res = p.login()197 res = p.login()
198 assert.Equal(t, http.StatusUnauthorized, res.status, res.body)198 assert.Equal(t, http.StatusUnauthorized, res.status, res.body)
199 assert.Empty(t, res.hdr.Values("Set-Cookie"))199 assert.Empty(t, res.hdr.Values("Set-Cookie"))
200- again := p.cli(t, adminToken, "web", "passkey", "remove", listed[0].ID)200+ again := p.cli(t, adminToken, "web", "passkey", "remove", "--", listed[0].ID)
201 require.Error(t, again.err)201 require.Error(t, again.err)
202 assert.Contains(t, again.err.Error(), "not found")202 assert.Contains(t, again.err.Error(), "not found")
203 }203 }

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 2

Tags 43

↑↓ moveenter openesc close