testutil

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package testutil holds small, dependency-free helpers shared by Go tests across packages. It is imported only from *_test.go files, never from production code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FutureRFC3339

func FutureRFC3339(hours int) string

FutureRFC3339 returns an RFC3339 (UTC) timestamp `hours` from now, mirroring the TypeScript aheadByHours (ui/src/app/lib/test-clock.ts). Use it instead of a literal calendar date in a fixture, which goes stale once the wall clock catches up to it. Negative hours give an already-expired timestamp.

A fixture meant to read as "live" (not merely unexpired) needs to clear both modelAccessExpiringWindow (24h) and the AWS SSO refresh skew, or grading logic will call it "expiring" — 24*30 is what this codebase uses for that case.

Types

This section is empty.

Jump to

Keyboard shortcuts

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