diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-10-03 15:51:56 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-10-03 18:00:30 +0900 |
| commit | aeb0ac9a329a253baf516be6ecfbdc4a750c6df6 (patch) | |
| tree | 275f7fd39936dfb65ee56e58163d1a2d816a7c36 /test/internal/testsuite/testsuite.go | |
| parent | 4b19686109b0962ea68dfe58feafffe3bac9c202 (diff) | |
internal/workflows: cache installed packages
This avoids re-downloading packages on every run.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'test/internal/testsuite/testsuite.go')
| -rw-r--r-- | test/internal/testsuite/testsuite.go | 11 |
1 files changed, 11 insertions, 0 deletions
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:]...) |
