burrow/services/forgejo-nsc/internal/nsc/macos_nsc_test.go
Conrad Kramer 283209d364
Some checks failed
Build Apple / Build App (macOS) (push) Waiting to run
Build Apple / Build App (iOS Simulator) (push) Has started running
Build Site / Next.js Build (push) Successful in 2m1s
Build Rust / Cargo Test (push) Has been cancelled
Harden macos runner cleanup
2026-03-19 14:01:37 -07:00

33 lines
739 B
Go

package nsc
import "testing"
func TestNormalizeMacOSNSCMachineTypeRoundsUp(t *testing.T) {
t.Parallel()
got, changed, err := normalizeMacOSNSCMachineType("5x10")
if err != nil {
t.Fatalf("normalizeMacOSNSCMachineType: %v", err)
}
if !changed {
t.Fatal("expected machine type to be normalized")
}
if got != "6x14" {
t.Fatalf("expected 6x14, got %q", got)
}
}
func TestNormalizeMacOSNSCMachineTypeKeepsAllowedShape(t *testing.T) {
t.Parallel()
got, changed, err := normalizeMacOSNSCMachineType("6x14")
if err != nil {
t.Fatalf("normalizeMacOSNSCMachineType: %v", err)
}
if changed {
t.Fatal("expected allowed machine type to remain unchanged")
}
if got != "6x14" {
t.Fatalf("expected 6x14, got %q", got)
}
}