clean up of the codebase

This commit is contained in:
ari committed 2026-11-01 13:01:54 -05:00
1 parent 7822529a38
commit 0ac61b4ece
52 files changed
+2545 -2274

No files matched your search

@@ -0,0 +1,24 @@
package local
import (
"testing"
"slackerbot/internal/model"
)
func TestCapacity(t *testing.T) {
c := Capacity{Usable: model.Size{MemoryMB: 6144, CPUs: 3}}
def := model.Size{MemoryMB: 2048, CPUs: 1}
if got := c.Slots(def); got != 3 {
t.Fatalf("slots = %d, want 3", got)
}
if !c.Room(model.Size{MemoryMB: 4096, CPUs: 2}, def) {
t.Fatal("third container should fit")
}
if c.Room(model.Size{MemoryMB: 6144, CPUs: 3}, def) {
t.Fatal("fourth container should not fit")
}
if c.Room(model.Size{MemoryMB: 2048, CPUs: 2.5}, def) {
t.Fatal("should be blocked by CPU")
}
}