MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / TestCheckWritePermission_Fail

Function TestCheckWritePermission_Fail

internal/update/update_test.go:267–275  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

265}
266
267func TestCheckWritePermission_Fail(t *testing.T) {
268 dir := t.TempDir()
269 os.Chmod(dir, 0o555)
270 defer os.Chmod(dir, 0o755) // restore for cleanup
271
272 if err := checkWritePermission(dir); err == nil {
273 t.Error("expected write permission check to fail")
274 }
275}
276
277func TestDownloadToTemp(t *testing.T) {
278 content := "binary content here"

Callers

nothing calls this directly

Calls 1

checkWritePermissionFunction · 0.85

Tested by

no test coverage detected