From 845479d7cdbd3893ab5bd46aa6bed03b164c194c Mon Sep 17 00:00:00 2001 From: jochen Date: Fri, 23 Oct 2026 11:30:26 +0200 Subject: [PATCH] =?UTF-8?q?mesh-build-node:=20prove=20the=20npm=20download?= =?UTF-8?q?=20cache=20beside=20the=20toolchains=20stays=20its=20owner's=20?= =?UTF-8?q?(ADR=200533=20=C2=A72)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cmd/mesh-build-node/toolchain_open_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/mesh-build-node/cmd/mesh-build-node/toolchain_open_test.go b/modules/mesh-build-node/cmd/mesh-build-node/toolchain_open_test.go index a64ed321..015dc6e9 100644 --- a/modules/mesh-build-node/cmd/mesh-build-node/toolchain_open_test.go +++ b/modules/mesh-build-node/cmd/mesh-build-node/toolchain_open_test.go @@ -64,10 +64,17 @@ func TestAnInstalledToolchainIsReadableByOthersAndWritableByItsOwnerAlone(t *tes fake := &fakeNpm{} tc := toolchainIn(t, fake) tc.Run = npmAsUmask077(fake) + npm := filepath.Join(tc.Paths.Cache, "npm") + if err := os.MkdirAll(npm, 0o700); err != nil { + t.Fatal(err) + } if err := tc.Ensure(context.Background(), "v1"); err != nil { t.Fatal(err) } checkOpen(t, tc) + if st, err := os.Stat(npm); err != nil || st.Mode().Perm() != 0o700 { + t.Errorf("the npm download cache beside the toolchains is %v (%v), want 0700: only the toolchains are opened", st.Mode().Perm(), err) + } } // 1891 (ADR 0533 ยง2): a toolchain installed before this release, shut to its owner, is opened by the next Ensure