27 lines
668 B
Go
27 lines
668 B
Go
package status
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestCodexChecker(t *testing.T) {
|
|
t.Skip("Skipping interactive TUI test by default")
|
|
|
|
ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)
|
|
defer cancel()
|
|
|
|
checker := NewCodexChecker()
|
|
status, err := checker.Check(ctx)
|
|
if err != nil {
|
|
t.Fatalf("Failed to check codex status: %v", err)
|
|
}
|
|
|
|
fmt.Printf("Raw Output:\n%s\n", status.RawOutput)
|
|
fmt.Printf("Daily Limit: %s\n", status.DailyLimit)
|
|
fmt.Printf("Daily Reset Time: %s\n", status.DailyResetTime)
|
|
fmt.Printf("Weekly Limit: %s\n", status.WeeklyLimit)
|
|
fmt.Printf("Weekly Reset Time: %s\n", status.WeeklyResetTime)
|
|
}
|