MCPcopy Create free account
hub / github.com/Thunder-Compute/thunder-cli / TestStorageRange

Function TestStorageRange

utils/spec_store_test.go:112–135  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

110}
111
112func TestStorageRange(t *testing.T) {
113 s := testSpecStore()
114
115 tests := []struct {
116 name string
117 gpuType string
118 numGPUs int
119 expectedMin int
120 expectedMax int
121 }{
122 {"a6000", "a6000", 1, 100, 500},
123 {"a100xl x1", "a100xl", 1, 100, 500},
124 {"a100xl x2", "a100xl", 2, 100, 1000},
125 {"unknown falls back to 100-1000", "unknown", 1, 100, 1000},
126 }
127
128 for _, tt := range tests {
129 t.Run(tt.name, func(t *testing.T) {
130 minGB, maxGB := s.StorageRange(tt.gpuType, tt.numGPUs)
131 assert.Equal(t, tt.expectedMin, minGB)
132 assert.Equal(t, tt.expectedMax, maxGB)
133 })
134 }
135}
136
137func TestNormalizeGPUType(t *testing.T) {
138 s := testSpecStore()

Callers

nothing calls this directly

Calls 2

StorageRangeMethod · 0.80
testSpecStoreFunction · 0.70

Tested by

no test coverage detected