WIP: cheap scrypt in tests
check / check (push) Successful in 2m52s

This commit is contained in:
2026-10-06 00:20:26 +00:00
parent af9ac6d979
commit 8c82ce628f
6 changed files with 41 additions and 5 deletions
+5 -1
View File
@@ -52,8 +52,12 @@ func runSecretWithStdin(stdin string, env map[string]string, args ...string) (st
return cli.ExecuteCommandInProcess(args, stdin, env)
}
// TestMain runs before all tests and ensures the binary is built
// TestMain runs before all tests and ensures the binary is built. It also
// makes passphrase encryption in the tests cheap (see
// secret.ScryptWorkFactor); the binary keeps age's work factor.
func TestMain(m *testing.M) {
secret.ScryptWorkFactor = 1
// Get the current working directory
wd, err := os.Getwd()
if err != nil {