mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
d2449cd345
1. Split the oversized `cmd/agent` entrypoint into a multi-file package and update dev/build scripts to use the package path instead of compiling `main.go` directly. 2. Add a new `memoh` terminal UI for local bot chat, with Bubble Tea
25 lines
495 B
Go
25 lines
495 B
Go
package containerd
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestTimezoneSpec_WithTZ(t *testing.T) {
|
|
t.Setenv("TZ", "Asia/Shanghai")
|
|
mounts, env := TimezoneSpec()
|
|
if len(mounts) != 0 {
|
|
t.Fatalf("expected no mounts, got %d", len(mounts))
|
|
}
|
|
if len(env) == 0 {
|
|
t.Fatal("expected at least one env var when TZ is set")
|
|
}
|
|
}
|
|
|
|
func TestTimezoneSpec_WithoutTZ(t *testing.T) {
|
|
t.Setenv("TZ", "")
|
|
mounts, _ := TimezoneSpec()
|
|
if len(mounts) != 0 {
|
|
t.Fatalf("expected no mounts, got %d", len(mounts))
|
|
}
|
|
}
|