testutil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BareGitRepo

func BareGitRepo(t *testing.T) string

BareGitRepo creates a temporary bare git repository for testing. Returns the path to the bare repo. To make it non-empty (cloneable), a temporary working copy is created with an initial commit.

func TempHakoHome

func TempHakoHome(t *testing.T) string

TempHakoHome creates a temporary ~/.hako/ structure and sets HAKO_HOME. Returns the hako home path. Cleanup is automatic via t.TempDir().

func TestAgeIdentity

func TestAgeIdentity(t *testing.T) (identity, recipient string)

TestAgeIdentity generates a test age keypair. Returns the identity (secret key) and recipient (public key) strings.

func WriteTestFile

func WriteTestFile(t *testing.T, path, content string, perm os.FileMode)

WriteTestFile creates a file with the given content and permissions.

Types

This section is empty.

Jump to

Keyboard shortcuts

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