diff --git a/controller/internal/web/netstorage_job_test.go b/controller/internal/web/netstorage_job_test.go index 3bf6da3..b009ff0 100644 --- a/controller/internal/web/netstorage_job_test.go +++ b/controller/internal/web/netstorage_job_test.go @@ -14,6 +14,7 @@ import ( "gitea.dooplex.hu/admin/felhom-controller/internal/agentapi" "gitea.dooplex.hu/admin/felhom-controller/internal/settings" + "gitea.dooplex.hu/admin/felhom-controller/internal/system" ) // Orchestration tests (verify-before-commit): everything runs through the netAgent / netProbeFn / @@ -220,7 +221,13 @@ func TestNetAdd_VerifyLost_RollsBack(t *testing.T) { } // --- C5: the --netprobe child body (pure file logic, t.TempDir) --------------------------------------- +// The fstype assertion (RCA fix 2) is pinned to `network` here — these rows test the WRITE/READBACK/ +// CLEANUP logic against a local tempdir, which the real classifier would (correctly) refuse as a +// stub. The assertion has its own suite: netprobe_stub_test.go. func TestNetProbeChild(t *testing.T) { + origClass := netProbeFSClass + netProbeFSClass = func(string) string { return system.FSClassNetwork } + t.Cleanup(func() { netProbeFSClass = origClass }) t.Run("ok", func(t *testing.T) { dir := t.TempDir() if got := NetProbeChild(dir); got != netProbeExitOK {