From aeb0ac9a329a253baf516be6ecfbdc4a750c6df6 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sat, 3 Oct 2026 15:51:56 +0900 Subject: internal/workflows: cache installed packages This avoids re-downloading packages on every run. Signed-off-by: Ophestra --- test/internal/testsuite/testsuite.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/internal') diff --git a/test/internal/testsuite/testsuite.go b/test/internal/testsuite/testsuite.go index 4b70da34..9233818d 100644 --- a/test/internal/testsuite/testsuite.go +++ b/test/internal/testsuite/testsuite.go @@ -6,6 +6,7 @@ import ( "os" "os/exec" "os/signal" + "os/user" "syscall" ) @@ -25,6 +26,16 @@ func ReceiveSignals() { log.Fatalf("terminating on signal %s", <-s) } +// GetUser returns the [user.User] structure describing the user with uid 1000. +func GetUser() *user.User { + if u, err := user.LookupId("1000"); err != nil { + log.Fatal(err) + return nil + } else { + return u + } +} + // MustRun runs command and terminates the testsuite on error. func MustRun(command ...string) { cmd := exec.Command(command[0], command[1:]...) -- cgit v1.3.1