testutil

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package testutil holds shared test guards for OS-dependent filesystem behavior. CI runs {ubuntu, macos, windows}; any test that provokes an error via Unix filesystem semantics must use one of these guards instead of a bare runtime.GOOS / Geteuid check, so the skip policy stays uniform.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SkipUnlessPermissionEnforcement

func SkipUnlessPermissionEnforcement(t *testing.T)

SkipUnlessPermissionEnforcement skips tests that provoke errors via permission bits (chmod read-only dirs, 0o000 files). Windows does not enforce those bits, and root bypasses them.

func SkipUnlessUnixFSErrors

func SkipUnlessUnixFSErrors(t *testing.T)

SkipUnlessUnixFSErrors skips tests that depend on Unix error classification (e.g. ENOTDIR from reading a regular file as a directory). Windows maps some of these to not-exist, which defensive production code treats as absence rather than failure.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL