detached eee76d7

test(cef): specify subprocess runtime propagation

commit
eee76d73991e94880fc73913d257eefa82e1c317
author
brice · · 2026-07-14 07:37 UTC
committer
brice · · 2026-07-14 09:35 UTC
parent
0eb3b66
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
1 file · +16 -0
M internal/infrastructure/cef/engine_init_test.go +16 -0
@@ -36,6 +36,22 @@ func TestResolvedStateRoot_UsesProfileDefault(t *testing.T) {
3636 require.Equal(t, profile.CEFUserDataDir(), root)
3737 }
3838
39+func TestConfigureCEFSubprocessRuntime_PropagatesConfiguredRuntimeBeforeInit(t *testing.T) {
40+ t.Setenv("CEF_DIR", "")
41+
42+ runtime := filepath.Join(t.TempDir(), "cef-147")
43+ require.Equal(t, runtime, configureCEFSubprocessRuntime(runtime))
44+ require.Equal(t, runtime, os.Getenv("CEF_DIR"))
45+}
46+
47+func TestConfigureCEFSubprocessRuntime_PreservesExplicitEnvironmentOverride(t *testing.T) {
48+ explicitRuntime := filepath.Join(t.TempDir(), "cef-env")
49+ t.Setenv("CEF_DIR", explicitRuntime)
50+
51+ require.Equal(t, explicitRuntime, configureCEFSubprocessRuntime(filepath.Join(t.TempDir(), "cef-config")))
52+ require.Equal(t, explicitRuntime, os.Getenv("CEF_DIR"))
53+}
54+
3955 func TestPrepareCEFSettings_UsesResolvedProfilePaths(t *testing.T) {
4056 logger := zerolog.Nop()
4157 profile := testCEFDevProfile(t)
@@ -36,6 +36,22 @@ func TestResolvedStateRoot_UsesProfileDefault(t *testing.T) {
36 require.Equal(t, profile.CEFUserDataDir(), root)36 require.Equal(t, profile.CEFUserDataDir(), root)
37 }37 }
38 38
39+func TestConfigureCEFSubprocessRuntime_PropagatesConfiguredRuntimeBeforeInit(t *testing.T) {
40+ t.Setenv("CEF_DIR", "")
41+
42+ runtime := filepath.Join(t.TempDir(), "cef-147")
43+ require.Equal(t, runtime, configureCEFSubprocessRuntime(runtime))
44+ require.Equal(t, runtime, os.Getenv("CEF_DIR"))
45+}
46+
47+func TestConfigureCEFSubprocessRuntime_PreservesExplicitEnvironmentOverride(t *testing.T) {
48+ explicitRuntime := filepath.Join(t.TempDir(), "cef-env")
49+ t.Setenv("CEF_DIR", explicitRuntime)
50+
51+ require.Equal(t, explicitRuntime, configureCEFSubprocessRuntime(filepath.Join(t.TempDir(), "cef-config")))
52+ require.Equal(t, explicitRuntime, os.Getenv("CEF_DIR"))
53+}
54+
39 func TestPrepareCEFSettings_UsesResolvedProfilePaths(t *testing.T) {55 func TestPrepareCEFSettings_UsesResolvedProfilePaths(t *testing.T) {
40 logger := zerolog.Nop()56 logger := zerolog.Nop()
41 profile := testCEFDevProfile(t)57 profile := testCEFDevProfile(t)

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 8

Tags 42

↑↓ moveenter openesc close